From 2de29bfe075329ce329c61f97e2b944eaf582280 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Sun, 8 Sep 2019 16:08:54 +0000 Subject: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime This is what the original bug (http://llvm.org/PR39641) and the fix in https://reviews.llvm.org/D63877 have been about. With the dynamic runtime the test only passes when the asan library is linked against libstdc++: In contrast to libc++abi, it does not implement __cxa_rethrow_primary_exception so the regex matches the line saying that asan cannot intercept this function. Indeed, there is no message that the runtime failed to intercept __cxa_throw. Differential Revision: https://reviews.llvm.org/D67298 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@371336 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c b/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c index bad22fe2c..05b55f9e3 100644 --- a/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c +++ b/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c @@ -3,9 +3,10 @@ // // RUN: { env ASAN_OPTIONS=verbosity=1 %t.out %t.so || : ; } 2>&1 | FileCheck %s // -// CHECK: {{.*}}AddressSanitizer: failed to intercept '__cxa_{{.*}}throw{{.*}}' +// CHECK: AddressSanitizer: failed to intercept '__cxa_throw' // -// REQUIRES: x86_64-target-arch && !android +// This tests assumes static linking of the asan runtime. +// UNSUPPORTED: asan-dynamic-runtime #ifdef __cplusplus -- cgit v1.2.1