[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:13:20 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Fabio D'Urso (fabio-d)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/83034.diff
1 Files Affected:
- (modified) compiler-rt/lib/scudo/standalone/combined.h (+3-2)
``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h
index cd5a07be1576e9..197c6d85c9b06c 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -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());
atomic_store(&RingBufferAddress, 0, memory_order_release);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/83034
More information about the llvm-commits
mailing list