diff options
author | 2023-03-13 21:53:26 +0000 | |
---|---|---|
committer | 2023-03-13 21:53:26 +0000 | |
commit | 202b3e4a5c76f24591de79b99580bd547c71ec6b (patch) | |
tree | 639a82f0e3f4c766d2a8ae909242a1eabe928adc /12.2.0 | |
parent | 13.1.0: don't set _FORTIFY_SOURCE if -fsanitize=address (ASAN) is enabled (diff) | |
download | gcc-patches-202b3e4a5c76f24591de79b99580bd547c71ec6b.tar.gz gcc-patches-202b3e4a5c76f24591de79b99580bd547c71ec6b.tar.bz2 gcc-patches-202b3e4a5c76f24591de79b99580bd547c71ec6b.zip |
12.2.0: don't set _FORTIFY_SOURCE if -fsanitize=address (ASAN) is enabled
This can cause either false positives in warnings from the compiler or false
negatives where the sanitizer misses something.
Bug: https://github.com/google/sanitizers/issues/247
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '12.2.0')
-rw-r--r-- | 12.2.0/gentoo/01_all_default-fortify-source.patch | 4 | ||||
-rw-r--r-- | 12.2.0/gentoo/README.history | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/12.2.0/gentoo/01_all_default-fortify-source.patch b/12.2.0/gentoo/01_all_default-fortify-source.patch index 79d6639..4cdf5f6 100644 --- a/12.2.0/gentoo/01_all_default-fortify-source.patch +++ b/12.2.0/gentoo/01_all_default-fortify-source.patch @@ -16,8 +16,8 @@ initially Gentoo used too complicated macro. + #define GENTOO_FORTIFY_SOURCE_LEVEL 2 + #endif + -+ /* Fortify Source enabled by default for optimization levels > 0 */ -+ if (optimize) ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) + builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); +#endif + diff --git a/12.2.0/gentoo/README.history b/12.2.0/gentoo/README.history index fcae351..23576e0 100644 --- a/12.2.0/gentoo/README.history +++ b/12.2.0/gentoo/README.history @@ -1,3 +1,6 @@ +14 13 Mar 2023 + U 01_all_default-fortify-source.patch + 13 12 Feb 2023 - 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch |