[llvm] [ASan][JSON] Unpoison memory before its reuse (PR #79065)

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


================
@@ -482,6 +482,13 @@ class Value {
   friend class Object;
 
   template <typename T, typename... U> void create(U &&... V) {
+#if defined(LLVM_ADDRESS_SANITIZER_BUILD)
+    // Unpoisoning to prevent overwriting poisoned object (e.g., annotated short
+    // string). Objects that have had their memory poisoned may cause an ASan
----------------
AdvenamTacet wrote:

I didn't find a way to do it yet. Since this stops a larger commit that, to the best of my knowledge, has no bugs, I'm all for upstreaming this temporary solution and then solving the real problem later.

Short string annotations may help with detecting many bugs, therefore I want them to be in LLVM18. The sooner we upstream them, the sooner bugs are detected.

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


More information about the llvm-commits mailing list