[libcxx-commits] [libcxx] [llvm] [ASan][libc++] Turn on ASan annotations for short strings (PR #79049)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 22 13:48:53 PST 2024
================
@@ -319,6 +319,9 @@ template <typename ReturnT, typename... ParamTs> class UniqueFunctionBase {
#ifndef NDEBUG
// In debug builds, we also scribble across the rest of the storage.
+#ifndef _LIBCPP_HAS_NO_ASAN
+ __asan_unpoison_memory_region(RHS.getInlineStorage(), InlineStorageSize);
+#endif
memset(RHS.getInlineStorage(), 0xAD, InlineStorageSize);
----------------
AdvenamTacet wrote:
What is a general way of checking if compiling with ASan? `defined(ADDRESS_SANITIZER) || defined(__SANITIZE_ADDRESS__)`?
https://github.com/llvm/llvm-project/pull/79049
More information about the libcxx-commits
mailing list