https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82825
Bug ID: 82825 Summary: [8 regression] Many libsanitizer tests FAIL: dyld: Symbol not found: ___lsan_default_options Product: gcc Version: 8.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 Target Milestone: --- Host: x86_64-apple-darwin11.4.2 Target: x86_64-apple-darwin11.4.2 Build: x86_64-apple-darwin11.4.2 Since the import of libsanitizer from upstream r315899, many tests FAIL on Mac OS X 10.7/Darwin 11 like this: FAIL: c-c++-common/asan/alloca_big_alignment.c -O0 output pattern test, is dyld: Symbol not found: ___lsan_default_options Referenced from: /private/var/gcc/regression/trunk/10.7-gcc-32/build/i386-apple-darwin11.4.2/./libsanitizer/asan/.libs/libasan.5.dylib Expected in: flat namespace in /private/var/gcc/regression/trunk/10.7-gcc-32/build/i386-apple-darwin11.4.2/./libsanitizer/asan/.libs/libasan.5.dylib , should match WRITE of size 1 at 0x[0-9a-f]+ thread T0[^ [...] This is obviously due to this change: -#if (SANITIZER_LINUX || SANITIZER_WINDOWS) && !SANITIZER_GO [...] +// SANITIZER_SUPPORTS_WEAK_HOOKS means that we support real weak functions that +// will evaluate to a null pointer when not defined. +#ifndef SANITIZER_SUPPORTS_WEAK_HOOKS +#if (SANITIZER_LINUX || SANITIZER_MAC) && !SANITIZER_GO # define SANITIZER_SUPPORTS_WEAK_HOOKS 1 #else # define SANITIZER_SUPPORTS_WEAK_HOOKS 0 #endif +#endif // SANITIZER_SUPPORTS_WEAK_HOOKS The tests work e.g. on macOS 10.13/Darwin 17. Rainer