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:
Nico Weber 2015-02-25 04:39:21 +00:00
parent 795bd2d411
commit d70bb8d8cb
3 changed files with 0 additions and 19 deletions

View File

@ -31,22 +31,11 @@ static const char *kSuppressionTypes[] = {
kInterceptorName, kInterceptorViaFunction, kInterceptorViaLibrary, kInterceptorName, kInterceptorViaFunction, kInterceptorViaLibrary,
kODRViolation}; 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() { void InitializeSuppressions() {
CHECK_EQ(nullptr, suppression_ctx); CHECK_EQ(nullptr, suppression_ctx);
suppression_ctx = new (suppression_placeholder) // NOLINT suppression_ctx = new (suppression_placeholder) // NOLINT
SuppressionContext(kSuppressionTypes, ARRAY_SIZE(kSuppressionTypes)); SuppressionContext(kSuppressionTypes, ARRAY_SIZE(kSuppressionTypes));
suppression_ctx->ParseFromFile(flags()->suppressions); 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) { bool IsInterceptorSuppressed(const char *interceptor_name) {

View File

@ -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_malloc_hook=___sanitizer_default_malloc_hook") // NOLINT
#pragma comment(linker, "/alternatename:___sanitizer_free_hook=___sanitizer_default_free_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_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 #pragma comment(linker, "/alternatename:___asan_on_error=___asan_default_on_error") // NOLINT
} // extern "C" } // extern "C"

View File

@ -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() {}