[llvm-branch-commits] [llvm] 637bd86 - Revert "[ASan][ADT] Don't scribble with ASan (#79066)"
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 6 15:49:16 PDT 2026
Author: Aiden Grossman
Date: 2026-05-06T15:49:13-07:00
New Revision: 637bd865afad7ae8c7bdd7fbf8cb2e6d2d9d2f9c
URL: https://github.com/llvm/llvm-project/commit/637bd865afad7ae8c7bdd7fbf8cb2e6d2d9d2f9c
DIFF: https://github.com/llvm/llvm-project/commit/637bd865afad7ae8c7bdd7fbf8cb2e6d2d9d2f9c.diff
LOG: Revert "[ASan][ADT] Don't scribble with ASan (#79066)"
This reverts commit 51a11f1c44b7bd7655687471d8c8912afb637efc.
Added:
Modified:
llvm/include/llvm/ADT/FunctionExtras.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/FunctionExtras.h b/llvm/include/llvm/ADT/FunctionExtras.h
index 807a2e769999c..f853bbf7d976d 100644
--- a/llvm/include/llvm/ADT/FunctionExtras.h
+++ b/llvm/include/llvm/ADT/FunctionExtras.h
@@ -35,7 +35,6 @@
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLForwardCompat.h"
-#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemAlloc.h"
#include "llvm/Support/type_traits.h"
#include <cstring>
@@ -310,10 +309,8 @@ template <typename ReturnT, typename... ParamTs> class UniqueFunctionBase {
// Clear the old callback and inline flag to get back to as-if-null.
RHS.CallbackAndInlineFlag = {};
-#if !defined(NDEBUG) && !LLVM_ADDRESS_SANITIZER_BUILD
- // In debug builds without ASan, we also scribble across the rest of the
- // storage. Scribbling under AddressSanitizer (ASan) is disabled to prevent
- // overwriting poisoned objects (e.g., annotated short strings).
+#ifndef NDEBUG
+ // In debug builds, we also scribble across the rest of the storage.
memset(RHS.getInlineStorage(), 0xAD, InlineStorageSize);
#endif
}
More information about the llvm-branch-commits
mailing list