[compiler-rt] [scudo] Handle failed mmap for allocation ring buffer (PR #71817)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 10:55:42 PST 2023


================
@@ -1281,7 +1281,8 @@ class Allocator {
 
   void storeSecondaryAllocationStackMaybe(const Options &Options, void *Ptr,
                                           uptr Size) {
-    if (!UNLIKELY(Options.get(OptionBit::TrackAllocationStacks)))
+    if (!UNLIKELY(Options.get(OptionBit::TrackAllocationStacks)) ||
+        RawRingBuffer == nullptr)
----------------
ChiaHungDuan wrote:

Can we use `RawRingBuffer` as a switch here? Or do we have the scenario that we may want to turn on/off the stack storing randomly?

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


More information about the llvm-commits mailing list