[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 07:48:23 PDT 2016


dvyukov added a comment.

No, we need them to be atomic with free.
Consider:
T1 does Acq+Rel
T2 does Acq+Rel
T2 releases reference
T1 releases reference and frees the object
free is not synchronized with T2


http://reviews.llvm.org/D21609





More information about the llvm-commits mailing list