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

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 09:57:18 PST 2024


================
@@ -317,8 +317,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) && !defined(LLVM_ADDRESS_SANITIZER_BUILD)
+    // In debug builds without ASan, we also scribble across the rest of the
----------------
aeubanks wrote:

nit, I'd reword the second sentence to say `Disable scribbling under ASan to...` since ASan isn't disabling it, we're disabling it under ASan

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


More information about the llvm-commits mailing list