[PATCH] D21609: [tsan] Intercept libcxx __release_shared to avoid false positive with weak_ptrs and destructors in C++

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 09:35:40 PDT 2016


kubabrecka added a comment.

In http://reviews.llvm.org/D21609#465655, @dvyukov wrote:

> I can only think of other ugly solutions.
>  But first I need to ask: have you considered bundling tsan-instrumented libc++ with clang? It would benefit asan/tsan, and is a requirement for msan.


Yes.  I'm able to build it and use it.  But distributing it to users is logistically extremely problematic.  The original library ships with the OS, but we cannot ship an instrumented version as well, because that depends on the version of the instrumentation.  Having the dylib in the toolchain would yet again complicate a lot of use cases, like deploying to different machines (e.g. for testing).

Having an interceptor (or a few of them), even when it's ugly and complex, is by far the easiest option for us.


http://reviews.llvm.org/D21609





More information about the llvm-commits mailing list