diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-09-14 19:11:22 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-09-14 19:17:37 +0100 |
commit | 0abc63a5ea4550c9e75e81b05a153dfb4b234446 (patch) | |
tree | 4aaf3f1e1f289b3b6dc67a80d4ef3de46d4b061f /gcc | |
parent | 7f1e3d06bb9a39fb42afd4d0ea1a103fe239b1cb (diff) | |
download | gcc-0abc63a5ea4550c9e75e81b05a153dfb4b234446.zip gcc-0abc63a5ea4550c9e75e81b05a153dfb4b234446.tar.gz gcc-0abc63a5ea4550c9e75e81b05a153dfb4b234446.tar.bz2 |
libstdc++: Add TSan annotations to std::atomic<shared_ptr<T>>
This adds annotations to std::atomic<shared_ptr<T>> to enable TSan to
understand the custom locking. Without this, TSan reports data races for
accesses to the _M_ptr member, even though those are correctly
synchronized using atomic operations on the tagged pointer.
libstdc++-v3/ChangeLog:
* include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_DESTROY)
(_GLIBCXX_TSAN_MUTEX_PRE_LOCK, _GLIBCXX_TSAN_MUTEX_POST_LOCK)
(_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK, _GLIBCXX_TSAN_MUTEX_POST_UNLOCK)
(_GLIBCXX_TSAN_MUTEX_PRE_SIGNAL, _GLIBCXX_TSAN_MUTEX_POST_SIGNAL):
Define macros for TSan annotation functions.
(_Sp_atomic::_Atomic_count): Add annotations.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions