https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87880
Bug ID: 87880 Summary: [9 regression] All macOS asan execution tests FAIL Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, iains at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org, mikestump at comcast dot net Target Milestone: --- Target: *-*-apple-darwin* Since the recent merge of libsanitizer from upstream, all asan execution tests FAIL on Darwin (seen on Mac OS X 10.7, but the same issue is still present on macOS 10.14): FAIL: c-c++-common/asan/alloca_big_alignment.c -O0 output pattern test Output was: dyld: Symbol not found: ___cxa_rethrow_primary_exception Referenced from: /private/var/gcc/regression/trunk/10.7-gcc/build/x86_64-apple-darwin11.4.2/./libsanitizer/asan/.libs/libasan.5.dylib Expected in: flat namespace in /private/var/gcc/regression/trunk/10.7-gcc/build/x86_64-apple-darwin11.4.2/./libsanitizer/asan/.libs/libasan.5.dylib The merge introduced a new interceptor in asan/asan_interceptors.cc: #if ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION INTERCEPTOR(void, __cxa_rethrow_primary_exception, void *a) { CHECK(REAL(__cxa_rethrow_primary_exception)); __asan_handle_no_return(); REAL(__cxa_rethrow_primary_exception)(a); } #endif with ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION defined in asan/asan_interceptors.h. However, that function is only defined in libc++abi, which is linked on macOS in LLVM compiler-rt, but not present in gcc. I've hacked around this by disabling the interception inside my tree, but don't know how to properly handle this.