[compiler-rt] [scudo] Do not unmap the memory containing the this object in unmapRingBuffer (PR #83034)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 09:15:57 PST 2024


================
@@ -1610,8 +1610,9 @@ class Allocator {
     // is very important.
     RB->RawStackDepotMap.unmap(RB->RawStackDepotMap.getBase(),
                                RB->RawStackDepotMap.getCapacity());
-    RB->RawRingBufferMap.unmap(RB->RawRingBufferMap.getBase(),
-                               RB->RawRingBufferMap.getCapacity());
+    MemMapT RawRingBufferMap = RB->RawRingBufferMap;
+    RawRingBufferMap.unmap(RawRingBufferMap.getBase(),
+                           RawRingBufferMap.getCapacity());
----------------
ChiaHungDuan wrote:

Can we have some comment here? Something like what we have in secondary.h (https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/scudo/standalone/secondary.h#L67-L73)

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


More information about the llvm-commits mailing list