Skip to content

Commit

Permalink
[ASan] Only run dlopen-mixed-c-cxx.c with static runtime
Browse files Browse the repository at this point in the history
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

llvm-svn: 371336
  • Loading branch information
hahnjo committed Sep 8, 2019
1 parent 14f1990 commit 307daa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 307daa7

Please sign in to comment.