Browse Source

Assume LSan is always enabled in ASan builds
commit_hash:e48e4ec5e5215afc5c32dc6213398b6b28dbdd7b

babenko 5 months ago
parent
commit
f068240956

+ 1 - 1
library/cpp/yt/memory/atomic_intrusive_ptr-inl.h

@@ -35,7 +35,7 @@ TAtomicIntrusivePtr<T>::operator bool() const
     return Get();
 }
 
-#ifdef _lsan_enabled_
+#if defined(_lsan_enabled_) || defined(_asan_enabled_)
 
 template <class T>
 TAtomicIntrusivePtr<T>::TAtomicIntrusivePtr(TIntrusivePtr<T> other)

+ 2 - 2
library/cpp/yt/memory/atomic_intrusive_ptr.h

@@ -4,7 +4,7 @@
 
 #include <util/system/compiler.h>
 
-#ifdef _lsan_enabled_
+#if defined(_lsan_enabled_) || defined(_asan_enabled_)
 #include <util/system/spinlock.h>
 #endif
 
@@ -60,7 +60,7 @@ private:
     template <class U>
     friend bool operator!=(const TIntrusivePtr<U>& lhs, const TAtomicIntrusivePtr<U>& rhs);
 
-#ifdef _lsan_enabled_
+#if defined(_lsan_enabled_) || defined(_asan_enabled_)
     ::TSpinLock Lock_;
     TIntrusivePtr<T> Ptr_;
 #else

+ 1 - 1
library/cpp/yt/memory/unittests/atomic_intrusive_ptr_ut.cpp

@@ -12,7 +12,7 @@ namespace {
 
 ////////////////////////////////////////////////////////////////////////////////
 
-#ifndef _lsan_enabled_
+#if defined(_lsan_enabled_) || defined(_asan_enabled_)
 
 using ::testing::IsNull;
 using ::testing::NotNull;