[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 08:28:37 PDT 2016
kubabrecka added a comment.
In http://reviews.llvm.org/D21609#465569, @dvyukov wrote:
> 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
Ah, you’re right.
Do we have a recursive mutex in the runtime? I’m afraid destroying another shared_ptr from the destructor is quite likely.
http://reviews.llvm.org/D21609
More information about the llvm-commits
mailing list