[PATCH] D63877: Avoid infinite loop with asan interception

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 08:46:52 PDT 2019


Hahnfeld added a comment.

In D63877#1641054 <https://reviews.llvm.org/D63877#1641054>, @serge-sans-paille wrote:

> @Hahnfeld : I failed to reproduce the issue locally, but I assume the following patch may solve your issue:
>
>   --- a/compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
>   +++ b/compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
>   @@ -5,7 +5,7 @@
>    //
>    // CHECK: {{.*}}AddressSanitizer: failed to intercept '__cxa_{{.*}}throw{{.*}}'
>    //
>   -// REQUIRES: x86_64-target-arch && !android
>   +// REQUIRES: x86_64-target-arch && !android && !cxxabi
>
>
> can you give it a try?


Sure, this marks the test unsupported. The problem is that will also happen for most others because almost any default configuration of `compiler-rt` has the feature `cxxabi` which depends on `SANITIZER_ALLOW_CXXABI` (defaults to `ON`) for Linux systems.

Which CMake options did you try? I also have

- `-DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_LLD=ON` to link with libc++ (instead of libstdc++) and use lld
- `-DSANITIZER_CXX_ABI=libcxxabi -DSANITIZER_TEST_CXX=libc++` as mentioned above to use libc++ instead of libstdc++
- `-DCLANG_DEFAULT_CXX_STDLIB=libc++`, which you can also fake by manually passing `-stdlib=libc++` when compiling the shared library for this test

Can't test right now which ones you need to reproduce the problem, but given that @uweigand also sees the problem, it's not entirely artificial.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63877/new/

https://reviews.llvm.org/D63877





More information about the llvm-commits mailing list