Skip to content
Commit 30ad0c94 authored by Kuba Brecka's avatar Kuba Brecka
Browse files

[tsan] Intercept libcxx __release_shared to avoid false positive with...

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

There is a "well-known" TSan false positive when using C++ weak_ptr/shared_ptr and code in destructors, e.g. described at <https://llvm.org/bugs/show_bug.cgi?id=22324>. The "standard" solution is to build and use a TSan-instrumented version of libcxx, which is not trivial for end-users. This patch tries a different approach (on OS X): It adds an interceptor for the specific function in libc++.dylib, which implements the atomic operation that needs to be visible to TSan.

Differential Revision: http://reviews.llvm.org/D21609

llvm-svn: 273806
parent 9d08642c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment