[llvm] [ASan][ADT] Don't scribble with ASan (PR #79066)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 09:45:56 PST 2024


================
@@ -317,8 +318,10 @@ template <typename ReturnT, typename... ParamTs> class UniqueFunctionBase {
     // Clear the old callback and inline flag to get back to as-if-null.
     RHS.CallbackAndInlineFlag = {};
 
-#ifndef NDEBUG
-    // In debug builds, we also scribble across the rest of the storage.
+#if !defined(NDEBUG) && !LLVM_ADDRESS_SANITIZER_BUILD
----------------
vitalybuka wrote:

&& !LLVM_MEMORY_SANITIZER_BUILD # because memset makes uninitialzied stuff initialzed 
&& !LLVM_HWADDRESS_SANITIZER_BUILD   # I hope we will do similar to asan std:: support this year

https://github.com/llvm/llvm-project/pull/79066


More information about the llvm-commits mailing list