[PATCH] D21609: [tsan] Intercept libcxx __release_shared to avoid false positive with weak_ptrs and destructors in C++
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 08:56:21 PDT 2016
dvyukov added a comment.
Uh, if destructor is called there, then it won't work. Recursive mutexes won't help. A destructor can spawn another thread and wait for its completion, while the other thread can destroy other shared_ptr's which in turn will try to acquire the same mutex.
http://reviews.llvm.org/D21609
More information about the llvm-commits
mailing list