]> sourceware.org Git - newlib-cygwin.git/commit
ssp: add support for _FORTIFY_SOURCE=3
authorChristian Franke <christian.franke@t-online.de>
Fri, 26 Jan 2024 16:20:37 +0000 (17:20 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 29 Jan 2024 13:03:37 +0000 (14:03 +0100)
commit497e6eb2c0fadd0d4cb4ed418642832b020b19d4
tree4fe799502a20d08583e474d614c13ae84a600432
parent030a762535c1e18bf5a7ecc73b0f49898a30b157
ssp: add support for _FORTIFY_SOURCE=3

If specified, use __builtin_dynamic_object_size() instead of
__builtin_object_size() if supported (GCC 12.0 or later).
This enables buffer overflow checks if the buffer size is non-const
but known during runtime.
Use new macro __ssp_bos_known() instead of the (bos(p) != (size_t)-1)
checks.  The latter is no longer a compile time constant in all cases.
This avoids the generation of unused code.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
newlib/libc/include/ssp/ssp.h
newlib/libc/include/ssp/string.h
newlib/libc/include/ssp/strings.h
newlib/libc/include/sys/features.h
This page took 0.030007 seconds and 5 git commands to generate.