From: Iain Sandoe Date: Tue, 18 Jun 2019 08:01:00 +0000 (+0000) Subject: libsanitizer - remove reference to __cxa_rethrow_primary_exception. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9553f0d2216d4475d4d1afaa748b6b02f56c057b;p=gcc.git libsanitizer - remove reference to __cxa_rethrow_primary_exception. For some Darwin versions the absence of the rethrow_primary_exception symbol causes almost all sanitizer tests to fail. The symbol is not present in libstdc++ and, therefore is is correct to remove the reference to it for all platforms. We do this by adding a new guard "ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION". libsanitizer/ 2019-06-18 Iain Sandoe PR libsanitizer/87880 * asan/asan_interceptors.h: (ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION): New. * asan/Makefile.am (DEFS): Add ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION, defined to 0. * asan/Makefile.in: Regenerated. * asan/libtool-version: Bump version. From-SVN: r272406 --- diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index ff11c88d034..627d6893798 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,13 @@ +2019-06-18 Iain Sandoe + + PR libsanitizer/87880 + * asan/asan_interceptors.h: + (ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION): New. + * asan/Makefile.am (DEFS): Add + ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION, defined to 0. + * asan/Makefile.in: Regenerated. + * asan/libtool-version: Bump version. + 2019-05-27 Segher Boessenkool PR target/90639 diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am index 867240d2445..b18ab2a9211 100644 --- a/libsanitizer/asan/Makefile.am +++ b/libsanitizer/asan/Makefile.am @@ -3,7 +3,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) # May be used by toolexeclibdir. gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) -DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 +DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 if USING_MAC_INTERPOSE DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT endif diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in index 926ff7d7491..41bace42383 100644 --- a/libsanitizer/asan/Makefile.in +++ b/libsanitizer/asan/Makefile.in @@ -256,7 +256,8 @@ CYGPATH_W = @CYGPATH_W@ DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS \ -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \ -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 \ - -DCAN_SANITIZE_UB=0 $(am__append_1) + -DCAN_SANITIZE_UB=0 \ + -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 $(am__append_1) DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ diff --git a/libsanitizer/asan/asan_interceptors.h b/libsanitizer/asan/asan_interceptors.h index b599ebb0ba9..beb1dc9532b 100644 --- a/libsanitizer/asan/asan_interceptors.h +++ b/libsanitizer/asan/asan_interceptors.h @@ -79,7 +79,12 @@ void InitializePlatformInterceptors(); #if ASAN_HAS_EXCEPTIONS && !SANITIZER_WINDOWS && !SANITIZER_SOLARIS && \ !SANITIZER_NETBSD # define ASAN_INTERCEPT___CXA_THROW 1 -# define ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION 1 +# if ! defined(ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION) \ + || ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION +# define ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION 1 +# else +# define ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION 0 +# endif # if defined(_GLIBCXX_SJLJ_EXCEPTIONS) || (SANITIZER_IOS && defined(__arm__)) # define ASAN_INTERCEPT__UNWIND_SJLJ_RAISEEXCEPTION 1 # else diff --git a/libsanitizer/asan/libtool-version b/libsanitizer/asan/libtool-version index e3138f3b9f8..c509757b572 100644 --- a/libsanitizer/asan/libtool-version +++ b/libsanitizer/asan/libtool-version @@ -3,4 +3,4 @@ # a separate file so that version updates don't involve re-running # automake. # CURRENT:REVISION:AGE -5:0:0 +6:0:0