From 6c7279f1c99f554ef86a8df5c53e37207634c309 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 8 Jul 2017 11:51:57 +0300 Subject: [PATCH] [TSan] Added annotation for std::shared_ptr::~shared_ptr to hide false positive report --- cds/intrusive/cuckoo_set.h | 5 +++++ 1 file changed, 5 insertions(+) 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; } }; -- 2.34.1