[llvm] Revert "[ASan][ADT] Don't scribble with ASan" (PR #196201)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 15:51:24 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
Reverts llvm/llvm-project#<!-- -->79066
This is no longer necessary now that we have gotten rid of ASan short string annotations in libc++.
---
Full diff: https://github.com/llvm/llvm-project/pull/196201.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/FunctionExtras.h (+2-5)
``````````diff
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
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/196201
More information about the llvm-commits
mailing list