diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-06-11 19:33:43 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-06-11 19:33:43 +0300 |
commit | 2772a086f3b58acf3d5bdf3efe84262b7d9f67b1 (patch) | |
tree | 26e8b5a6b05677e0ff4674ac515f2b28799660f0 /library/cpp/yt/memory/leaky_singleton-inl.h | |
parent | 5937242d7c3791b37a6a52872f9560691035e9a0 (diff) | |
download | ydb-2772a086f3b58acf3d5bdf3efe84262b7d9f67b1.tar.gz |
Intermediate changes
Diffstat (limited to 'library/cpp/yt/memory/leaky_singleton-inl.h')
-rw-r--r-- | library/cpp/yt/memory/leaky_singleton-inl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/library/cpp/yt/memory/leaky_singleton-inl.h b/library/cpp/yt/memory/leaky_singleton-inl.h index 7a7b28a582..d8662a4b07 100644 --- a/library/cpp/yt/memory/leaky_singleton-inl.h +++ b/library/cpp/yt/memory/leaky_singleton-inl.h @@ -4,6 +4,10 @@ #include "leaky_singleton.h" #endif +#ifdef _asan_enabled_ +#include <sanitizer/lsan_interface.h> +#endif + #include <utility> namespace NYT { @@ -14,7 +18,13 @@ template <class T> template <class... TArgs> TLeakyStorage<T>::TLeakyStorage(TArgs&&... args) { +#ifdef _asan_enabled_ + __lsan_disable(); +#endif new (Get()) T(std::forward<TArgs>(args)...); +#ifdef _asan_enabled_ + __lsan_enable(); +#endif } template <class T> |