From: khizmax Date: Sat, 8 Jul 2017 08:51:57 +0000 (+0300) Subject: [TSan] Added annotation for std::shared_ptr::~shared_ptr to hide false positive report X-Git-Tag: v2.3.0~5 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6c7279f1c99f554ef86a8df5c53e37207634c309;p=libcds.git [TSan] Added annotation for std::shared_ptr::~shared_ptr to hide false positive report --- diff --git a/cds/intrusive/cuckoo_set.h b/cds/intrusive/cuckoo_set.h index 88bd7187..10a77026 100644 --- a/cds/intrusive/cuckoo_set.h +++ b/cds/intrusive/cuckoo_set.h @@ -697,7 +697,12 @@ namespace cds { namespace intrusive { struct lock_array_disposer { void operator()( lock_array_type * pArr ) { + // Seems, there is a false positive in std::shared_ptr deallocation in uninstrumented libc++ + // see, for example, https://groups.google.com/forum/#!topic/thread-sanitizer/eHu4dE_z7Cc + // https://reviews.llvm.org/D21609 + CDS_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN; lock_array_allocator().Delete( pArr ); + CDS_TSAN_ANNOTATE_IGNORE_WRITES_END; } };