aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/leaky_singleton-inl.h
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2023-06-11 19:33:43 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2023-06-11 19:33:43 +0300
commit2772a086f3b58acf3d5bdf3efe84262b7d9f67b1 (patch)
tree26e8b5a6b05677e0ff4674ac515f2b28799660f0 /library/cpp/yt/memory/leaky_singleton-inl.h
parent5937242d7c3791b37a6a52872f9560691035e9a0 (diff)
downloadydb-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.h10
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>