commit 1b16d85c3fb36565a8f36bb7c9e4a5890b65c143 Author: Georg Koppen gk@torproject.org Date: Tue Dec 5 19:35:47 2017 +0000
Bug 21925: Don't compile with ASan and FORTIFY_SOURCE
ASan and FORTIFY_SOURCE are not compatible with each other right now. Thus, we make sure that we have FORTIFY_SOURCE disabled in case the sanitizer is used. See #21925 for more details. --- build/autoconf/sanitize.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/build/autoconf/sanitize.m4 b/build/autoconf/sanitize.m4 index 3193d5c624cc..272bf0cda69a 100644 --- a/build/autoconf/sanitize.m4 +++ b/build/autoconf/sanitize.m4 @@ -32,8 +32,10 @@ if test -n "$MOZ_ASAN"; then CXXFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CXXFLAGS" fi fi - CFLAGS="-fsanitize=address $CFLAGS" - CXXFLAGS="-fsanitize=address $CXXFLAGS" + # ASan and FORTIFY_SOURCE are not compatible yet. Let's make sure we are + # compiling without FORTIFY_SOURCE if ASan is enabled, see #21925. + CFLAGS="-fsanitize=address $CFLAGS -U_FORTIFY_SOURCE" + CXXFLAGS="-fsanitize=address $CXXFLAGS -U_FORTIFY_SOURCE" if test -z "$CLANG_CL"; then LDFLAGS="-fsanitize=address $LDFLAGS" fi
tor-commits@lists.torproject.org