We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2c8ab commit 21c85d9Copy full SHA for 21c85d9
llvm/include/llvm/ADT/FunctionExtras.h
@@ -317,8 +317,10 @@ template <typename ReturnT, typename... ParamTs> class UniqueFunctionBase {
317
// Clear the old callback and inline flag to get back to as-if-null.
318
RHS.CallbackAndInlineFlag = {};
319
320
-#ifndef NDEBUG
321
- // In debug builds, we also scribble across the rest of the storage.
+#if !defined(NDEBUG) && !(defined(ADDRESS_SANITIZER) || defined(__SANITIZE_ADDRESS__))
+ // In debug builds without ASan, we also scribble across the rest of the storage.
322
+ // AddressSanitizer (ASAN) disables scribbling to prevent overwriting poisoned objects
323
+ // (e.g., annotated short strings).
324
memset(RHS.getInlineStorage(), 0xAD, InlineStorageSize);
325
#endif
326
}
0 commit comments