From: khizmax Date: Sun, 17 May 2015 14:31:08 +0000 (+0300) Subject: TSan exam: SplitList X-Git-Tag: v2.1.0~236 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c6ecfb843931b124a33aca8e3dd6f165d5d9b357;p=libcds.git TSan exam: SplitList --- diff --git a/cds/intrusive/split_list_rcu.h b/cds/intrusive/split_list_rcu.h index 99c1c23b..7c8618f7 100644 --- a/cds/intrusive/split_list_rcu.h +++ b/cds/intrusive/split_list_rcu.h @@ -561,7 +561,10 @@ namespace cds { namespace intrusive { dummy_node_type * pHead = get_bucket( nHash ); assert( pHead != nullptr ); + // TSan false positive: hash is read-only, will be ordered when we insert a node + CDS_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN; node_traits::to_node_ptr( val )->m_nHash = split_list::regular_hash( nHash ); + CDS_TSAN_ANNOTATE_IGNORE_WRITES_END; if ( m_List.insert_at( pHead, val, f )) { inc_item_count(); @@ -606,7 +609,10 @@ namespace cds { namespace intrusive { dummy_node_type * pHead = get_bucket( nHash ); assert( pHead != nullptr ); + // TSan false positive: hash is read-only, will be ordered when we insert a node + CDS_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN; node_traits::to_node_ptr( val )->m_nHash = split_list::regular_hash( nHash ); + CDS_TSAN_ANNOTATE_IGNORE_WRITES_END; std::pair bRet = m_List.ensure_at( pHead, val, func ); if ( bRet.first && bRet.second ) {