[tbb-commits] [tor-browser/tor-browser-52.5.2esr-7.5-1] Bug 21925: Don't compile with ASan and FORTIFY_SOURCE
gk at torproject.org
gk at torproject.org
Wed Dec 6 08:44:55 UTC 2017
commit 1b16d85c3fb36565a8f36bb7c9e4a5890b65c143
Author: Georg Koppen <gk at 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
More information about the tbb-commits
mailing list