https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87880
--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> --- Author: iains Date: Sun Aug 18 19:11:29 2019 New Revision: 274625 URL: https://gcc.gnu.org/viewcvs?rev=274625&root=gcc&view=rev Log: Darwin, 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". For the backported version, to avoid bumping the library version, this is only applied for Darwin (because of the way that symbol interposing works on Darwin, this does not alter the exported symbols list). libsanitizer/ 2019-08-18 Iain Sandoe <i...@sandoe.co.uk> Backport from mainline 2019-06-18 Iain Sandoe <i...@sandoe.co.uk> PR libsanitizer/87880 * asan/asan_interceptors.h: (ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION): New. * asan/Makefile.am (DEFS): Add (for Darwin only) ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION, defined to 0. * asan/Makefile.in: Regenerated. Modified: branches/gcc-9-branch/libsanitizer/ChangeLog branches/gcc-9-branch/libsanitizer/asan/Makefile.am branches/gcc-9-branch/libsanitizer/asan/Makefile.in branches/gcc-9-branch/libsanitizer/asan/asan_interceptors.h