[TSan] Fixed data races
[libcds.git] / cds / intrusive / striped_set / striping_policy.h
index b841a17c9a404a7c2d950c4b102e2b9a026b1e9b..4047963254ccce5e1aa578dd76e81e4b5d1bd257 100644 (file)
@@ -191,7 +191,12 @@ namespace cds { namespace intrusive { namespace striped_set {
         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;
             }
         };