[compiler-rt] [scudo] Double frees result in chunk state error (PR #110345)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 14:50:16 PDT 2024


================
@@ -1252,22 +1252,25 @@ class Allocator {
     else
       Header->State = Chunk::State::Quarantined;
 
-    void *BlockBegin;
-    if (LIKELY(!useMemoryTagging<AllocatorConfig>(Options))) {
+    if (LIKELY(!useMemoryTagging<AllocatorConfig>(Options)))
       Header->OriginOrWasZeroed = 0U;
-      if (BypassQuarantine && allocatorSupportsMemoryTagging<AllocatorConfig>())
-        Ptr = untagPointer(Ptr);
-      BlockBegin = getBlockBegin(Ptr, Header);
-    } else {
+    else
       Header->OriginOrWasZeroed =
           Header->ClassId && !TSDRegistry.getDisableMemInit();
----------------
cferris1000 wrote:

Done.

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


More information about the llvm-commits mailing list