<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fortify-headers, branch experimental</title>
<subtitle>Standalone portable header-based implementation of FORTIFY_SOURCE=3 
</subtitle>
<id>http://git.dustri.org/fortify-headers/atom?h=experimental</id>
<link rel='self' href='http://git.dustri.org/fortify-headers/atom?h=experimental'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/'/>
<updated>2025-10-28T22:18:21Z</updated>
<entry>
<title>Add a missing FORTIFY_PEDANTIC_CHECKS</title>
<updated>2025-10-28T22:18:21Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:18:21Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=ede3643ed290bc6b7764d6add93e76899f7629b2'/>
<id>urn:sha1:ede3643ed290bc6b7764d6add93e76899f7629b2</id>
<content type='text'>
Fixing the following issue:

```
In file included from xstrndup.c:34:
/OpenWrt/aarch64/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/include/fortify/string.h: In function 'mempcpy':
/OpenWrt/aarch64/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/include/fortify/string.h:340:13: error: 'nonnull' argument '__d' compared to NULL [-Werror=nonnull-compare]
  340 |         if (!__d || !__s)
      |             ^~~~
/OpenWrt/aarch64/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/include/fortify/string.h:340:21: error: 'nonnull' argument '__s' compared to NULL [-Werror=nonnull-compare]
  340 |         if (!__d || !__s)
      |                     ^~~~
cc1: all warnings being treated as errors
make[5]: *** [Makefile:511: xstrndup.o] Error 1
```

Reported in https://github.com/openwrt/openwrt/pull/20552
</content>
</entry>
<entry>
<title>Fix possible cast-mismatch spotted by `-Werror=cast-qual`</title>
<updated>2025-10-28T22:16:05Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:16:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=05baf9cfe90c25b02652489c6dd75810600ead5e'/>
<id>urn:sha1:05baf9cfe90c25b02652489c6dd75810600ead5e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use C90-compliant comments</title>
<updated>2025-10-28T22:13:42Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:13:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=8a43ce98138d363b6595a16b98b6016c5e306191'/>
<id>urn:sha1:8a43ce98138d363b6595a16b98b6016c5e306191</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix the CI on clang</title>
<updated>2025-10-28T20:54:31Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T20:33:16Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=89b628d34b1ef0423df35a72901daa194d7db956'/>
<id>urn:sha1:89b628d34b1ef0423df35a72901daa194d7db956</id>
<content type='text'>
Apparently, clang doesn't like the `putwchar` function for no good reason.
Replacing it with `printf` fixes a NULL-ptr deref, so let's do that, as we
don't really care about the content of the buffer anyway, only that it's not
optimized away.
</content>
</entry>
<entry>
<title>Remove superfluous defines in the testsuite</title>
<updated>2025-10-28T19:27:43Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T19:27:43Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=a826c69242b0e87a4e5d6817b7e46ab3cdbe6284'/>
<id>urn:sha1:a826c69242b0e87a4e5d6817b7e46ab3cdbe6284</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add GCC14 to the CI</title>
<updated>2025-10-28T19:20:21Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T19:20:21Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=76e6784ac9cb858d1d47ff6a27ef3ccc9a8cc785'/>
<id>urn:sha1:76e6784ac9cb858d1d47ff6a27ef3ccc9a8cc785</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fortify-headers: Remove __fh_has_builtin()</title>
<updated>2025-10-28T19:09:50Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-26T22:16:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=4b6225cf322adf3e47425156e00a844b2f08e221'/>
<id>urn:sha1:4b6225cf322adf3e47425156e00a844b2f08e221</id>
<content type='text'>
GCC complains about the `defined` usage here. Just call `__has_builtin` directly.

This fixes the following compile error when compiling strace:
```
In file included from /home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/stdlib.h:27,
                 from number_set.c:14:
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:28:7: note: in expansion of macro '__fh_has_builtin'
   28 | #if ! __fh_has_builtin(__builtin_trap)
      |       ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:73:29: note: in expansion of macro '__fh_has_builtin'
   73 | #if _FORTIFY_SOURCE  &gt; 2 &amp;&amp; __fh_has_builtin (__builtin_dynamic_object_size)
      |                             ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:158:5: note: in expansion of macro '__fh_has_builtin'
  158 | #if __fh_has_builtin (__builtin_mul_overflow_p)
      |     ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>Check if FORTIFY_USE_NATIVE_CHK is defined</title>
<updated>2025-10-28T17:12:50Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-26T16:38:41Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=7027b39b4de8ba361efce499472008e21ee29f86'/>
<id>urn:sha1:7027b39b4de8ba361efce499472008e21ee29f86</id>
<content type='text'>
The previews code tried to get the value defined for
FORTIFY_USE_NATIVE_CHK and this resulted in some build errors like
this:
```
/include/fortify/stdio.h: In function 'vsnprintf':
/include/fortify/stdio.h:155:49: error: "FORTIFY_USE_NATIVE_CHK" is not defined, evaluates to 0 [-Werror=undef]
  155 | #if __has_builtin(__builtin___vsnprintf_chk) &amp;&amp; FORTIFY_USE_NATIVE_CHK
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~
```

Check if it is defined instead.

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>poll: Check if _REDIR_TIME64 is defined</title>
<updated>2025-10-28T17:12:42Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-26T22:15:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=0161df05d7d647e478de22153722665713b376c9'/>
<id>urn:sha1:0161df05d7d647e478de22153722665713b376c9</id>
<content type='text'>
Treat _REDIR_TIME64 being undefined like being set to 0.

This fixes the following compile error in strace:
```
In file included from pathtrace.c:12:
/include/fortify/poll.h:46:30: error: "_REDIR_TIME64" is not defined, evaluates to 0 [-Werror=undef]
   46 | #if defined(_GNU_SOURCE) &amp;&amp; !_REDIR_TIME64
      |                              ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>Allow the CI to fail on clang for now</title>
<updated>2025-10-28T17:10:57Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T17:03:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=e3c3edbf7cb483e2c941140bf3f98c9dea905ada'/>
<id>urn:sha1:e3c3edbf7cb483e2c941140bf3f98c9dea905ada</id>
<content type='text'>
We know clang isn't working great for now, and we still need the CI to fix
bugs.
</content>
</entry>
</feed>
