diff options
author | nechda <nechda@yandex-team.com> | 2023-12-08 12:52:28 +0300 |
---|---|---|
committer | nechda <nechda@yandex-team.com> | 2023-12-08 13:34:36 +0300 |
commit | 90c0a74f0d36e1c054ff86f316e4850dda778606 (patch) | |
tree | 87717950c243ac2f6dd276e2e37528f9779990d7 | |
parent | 1ecca90eaa584266e39c6c166ede688e8bac242b (diff) | |
download | ydb-90c0a74f0d36e1c054ff86f316e4850dda778606.tar.gz |
Try enable TSAN on report unit-tests
Включаем TSAN над юнит-тестами репорта + для реализации TLightGuard-ов делаем фолбэк на обычные гарды в режиме сборки с санитайзерами.
-rw-r--r-- | library/cpp/threading/light_rw_lock/lightrwlock.cpp | 2 | ||||
-rw-r--r-- | library/cpp/threading/light_rw_lock/lightrwlock.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/library/cpp/threading/light_rw_lock/lightrwlock.cpp b/library/cpp/threading/light_rw_lock/lightrwlock.cpp index 6e06dc9ba3..ab056f9cef 100644 --- a/library/cpp/threading/light_rw_lock/lightrwlock.cpp +++ b/library/cpp/threading/light_rw_lock/lightrwlock.cpp @@ -1,7 +1,7 @@ #include "lightrwlock.h" #include <util/system/spinlock.h> -#if defined(_linux_) +#if defined(_linux_) && !defined(_tsan_enabled_) using namespace NS_LightRWLock; diff --git a/library/cpp/threading/light_rw_lock/lightrwlock.h b/library/cpp/threading/light_rw_lock/lightrwlock.h index abb97d6f7c..16523e9182 100644 --- a/library/cpp/threading/light_rw_lock/lightrwlock.h +++ b/library/cpp/threading/light_rw_lock/lightrwlock.h @@ -3,7 +3,9 @@ #include <util/system/rwlock.h> #include <util/system/sanitizers.h> -#if defined(_linux_) +// TLightRWLock and TSAN are not friends... + +#if defined(_linux_) && !defined(_tsan_enabled_) /* TLightRWLock is optimized for read lock and very fast lock/unlock switching. Read lock increments counter. Write lock sets highest bit of counter (makes counter negative). |