diff --git a/compiler-rt/lib/asan/asan_suppressions.cc b/compiler-rt/lib/asan/asan_suppressions.cc index 6912c6a22778..ea40554e4530 100644 --- a/compiler-rt/lib/asan/asan_suppressions.cc +++ b/compiler-rt/lib/asan/asan_suppressions.cc @@ -31,22 +31,11 @@ static const char *kSuppressionTypes[] = { kInterceptorName, kInterceptorViaFunction, kInterceptorViaLibrary, kODRViolation}; -#if SANITIZER_SUPPORTS_WEAK_HOOKS -extern "C" { -SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE -const char *__asan_default_suppressions(); -} // extern "C" -#endif // SANITIZER_SUPPORTS_WEAK_HOOKS - void InitializeSuppressions() { CHECK_EQ(nullptr, suppression_ctx); suppression_ctx = new (suppression_placeholder) // NOLINT SuppressionContext(kSuppressionTypes, ARRAY_SIZE(kSuppressionTypes)); suppression_ctx->ParseFromFile(flags()->suppressions); -#if SANITIZER_SUPPORTS_WEAK_HOOKS - if (&__asan_default_suppressions) - suppression_ctx->Parse(__asan_default_suppressions()); -#endif // SANITIZER_SUPPORTS_WEAK_HOOKS } bool IsInterceptorSuppressed(const char *interceptor_name) { diff --git a/compiler-rt/lib/asan/asan_win.cc b/compiler-rt/lib/asan/asan_win.cc index 119ecd83caac..0ffedb2731a5 100644 --- a/compiler-rt/lib/asan/asan_win.cc +++ b/compiler-rt/lib/asan/asan_win.cc @@ -44,7 +44,6 @@ void __asan_default_on_error() {} #pragma comment(linker, "/alternatename:___sanitizer_malloc_hook=___sanitizer_default_malloc_hook") // NOLINT #pragma comment(linker, "/alternatename:___sanitizer_free_hook=___sanitizer_default_free_hook") // NOLINT #pragma comment(linker, "/alternatename:___asan_default_options=___asan_default_default_options") // NOLINT -#pragma comment(linker, "/alternatename:___asan_default_suppressions=___asan_default_default_suppressions") // NOLINT #pragma comment(linker, "/alternatename:___asan_on_error=___asan_default_on_error") // NOLINT } // extern "C" diff --git a/compiler-rt/test/asan/TestCases/Linux/asan_default_suppressions.cc b/compiler-rt/test/asan/TestCases/Linux/asan_default_suppressions.cc deleted file mode 100644 index 5ff59c1dfe7f..000000000000 --- a/compiler-rt/test/asan/TestCases/Linux/asan_default_suppressions.cc +++ /dev/null @@ -1,7 +0,0 @@ -// Test that we use the suppressions from __asan_default_suppressions. -// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s -extern "C" { - const char *__asan_default_suppressions() { return "FooBar"; } -} -// CHECK: AddressSanitizer: failed to parse suppressions -int main() {}