[compiler-rt] [scudo] Do not unmap the memory containing the this object in unmapRingBuffer (PR #83034)
Fabio D'Urso via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 09:12:50 PST 2024
https://github.com/fabio-d created https://github.com/llvm/llvm-project/pull/83034
None
>From da6fa7f7407242bc331de34f941cfafd1cedbe73 Mon Sep 17 00:00:00 2001
From: Fabio D'Urso <fdurso at google.com>
Date: Mon, 26 Feb 2024 18:09:06 +0100
Subject: [PATCH] [scudo] Do not unmap the memory containing the this object in
unmapRingBuffer
---
compiler-rt/lib/scudo/standalone/combined.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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);
}
More information about the llvm-commits
mailing list