forked from OSchip/llvm-project
Revert 230419, 230425, 230432.
They don't build on Windows. http://lab.llvm.org:8011/builders/sanitizer-windows/ went red for example. llvm-svn: 230461
This commit is contained in:
parent
795bd2d411
commit
d70bb8d8cb
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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() {}
|
Loading…
Reference in New Issue