aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaxim Ostapenko <m.ostapenko@samsung.com>2018-07-04 19:49:06 +0000
committerMaxim Ostapenko <chefmax@gcc.gnu.org>2018-07-04 22:49:06 +0300
commitca8dd9f2745d6931f70b7a5f7e46f8e2032d5912 (patch)
tree05ab9d3e7c12ed003b81a038bb975000b4a57d80 /gcc
parenta617812f148c71209a94f33879b13fa603c6103c (diff)
downloadgcc-ca8dd9f2745d6931f70b7a5f7e46f8e2032d5912.zip
gcc-ca8dd9f2745d6931f70b7a5f7e46f8e2032d5912.tar.gz
gcc-ca8dd9f2745d6931f70b7a5f7e46f8e2032d5912.tar.bz2
re PR sanitizer/84250 (Symbol collision when using both Address and Undefined Behavior sanitizers (-fsanitize=address,undefined))
gcc/ 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com> PR sanitizer/84250 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static libasan. * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan. libsanitizer/ 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com> PR sanitizer/84250 * Makefile.am: Reorder libs. * Makefile.in: Regenerate. * asan/Makefile.am: Define DCAN_SANITIZE_UB=1, add dependancy from libsanitizer_ubsan.la. * asan/Makefile.in: Regenerate. * ubsan/Makefile.am: Define new libsanitizer_ubsan.la library. * ubsan/Makefile.in: Regenerate. From-SVN: r262421
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/gnu-user.h2
-rw-r--r--gcc/gcc.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b898915..2a609fe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ PR sanitizer/84250
+ * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
+ libasan.
+ * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
+
2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/86380
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index cba3c0b..ccae957 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -161,7 +161,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
"%{static-libasan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+ LD_DYNAMIC_OPTION " -lstdc++ }}%{!static-libasan:-lasan}"
#undef LIBTSAN_EARLY_SPEC
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
"%{static-libtsan:%{!shared:" \
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9ed8a03..51b7a55 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -993,7 +993,7 @@ proper position among the other output files. */
%{static:%ecannot specify -static with -fsanitize=address}}\
%{%:sanitize(thread):" LIBTSAN_SPEC "\
%{static:%ecannot specify -static with -fsanitize=thread}}\
- %{%:sanitize(undefined):" LIBUBSAN_SPEC "}\
+ %{!%:sanitize(address):%{%:sanitize(undefined):" LIBUBSAN_SPEC "}}\
%{%:sanitize(leak):" LIBLSAN_SPEC "}}}"
#endif