aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2024-02-22 12:37:06 -0800
committerFlorian Mayer <fmayer@google.com>2024-02-22 12:37:06 -0800
commitaf8afe08ee20a04b2ccb363cac66aa02cfaecd02 (patch)
tree2f76d8236c2208f46585272f8c11ebbcef7a8b7a
parent751cd2658bff08fd07cdb2eb022b473b35cbf2b8 (diff)
downloadllvm-af8afe08ee20a04b2ccb363cac66aa02cfaecd02.zip
llvm-af8afe08ee20a04b2ccb363cac66aa02cfaecd02.tar.gz
llvm-af8afe08ee20a04b2ccb363cac66aa02cfaecd02.tar.bz2
update message
Created using spr 1.3.4
-rw-r--r--compiler-rt/lib/scudo/standalone/combined.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h
index 479e49c..24ad979 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -1600,6 +1600,9 @@ private:
}
void swapOutRingBuffer(AllocationRingBuffer *NewRB) {
+ // To allow resizeRingBuffer to be called in a multi-threaded context by apps,
+ // we do not actually unmap, but only madvise(DONTNEED) the pages. That way,
+ // straggler threads will not crash.
AllocationRingBuffer *PrevRB = reinterpret_cast<AllocationRingBuffer *>(
atomic_exchange(&RingBufferAddress, reinterpret_cast<uptr>(NewRB),
memory_order_acq_rel));