Skip to content

Commit fff9e13

Browse files
author
pechatnov
committed
YT: Disable tsan for ref counted tracker
commit_hash:fe2d4f8cd15ba1b10e134484f0a61f698f37379f
1 parent 02fddc7 commit fff9e13

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

yt/yt/core/misc/ref_counted_tracker-inl.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,24 @@ class TRefCountedTracker::TNamedSlot
7474

7575
TRefCountedTrackerStatistics::TNamedSlotStatistics GetStatistics() const;
7676

77-
TNamedSlot& operator += (const TLocalSlot& rhs)
77+
#define REF_COUNTED_TRACKER_NO_TSAN
78+
#if defined(__has_feature)
79+
#if __has_feature(thread_sanitizer)
80+
#undef REF_COUNTED_TRACKER_NO_TSAN
81+
#define REF_COUNTED_TRACKER_NO_TSAN __attribute__((no_sanitize("thread")))
82+
#endif
83+
#endif
84+
85+
TNamedSlot& REF_COUNTED_TRACKER_NO_TSAN operator += (const TLocalSlot& rhs)
7886
{
7987
#define XX(name) name ## _ += rhs.name;
8088
ENUMERATE_SLOT_FIELDS()
8189
#undef XX
8290
return *this;
8391
}
8492

93+
#undef REF_COUNTED_TRACKER_NO_TSAN
94+
8595
TNamedSlot& operator += (const TGlobalSlot& rhs)
8696
{
8797
#define XX(name) name ## _ += rhs.name.load();

0 commit comments

Comments
 (0)