[compiler-rt] [scudo] [MTE] resize stack depot for allocation ring buffer (PR #74515)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 17:50:41 PST 2024


================
@@ -1256,7 +1275,8 @@ class Allocator {
   }
 
   void storePrimaryAllocationStackMaybe(const Options &Options, void *Ptr) {
-    if (!UNLIKELY(Options.get(OptionBit::TrackAllocationStacks)))
+    if (!UNLIKELY(Options.get(OptionBit::TrackAllocationStacks)) ||
+        !RawRingBuffer)
----------------
ChiaHungDuan wrote:

I don't understand why the follow up forbids packing the logic to a function?

It can be something like `getRingBuffer` and only returns non-nullptr when it's enabled.

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


More information about the llvm-commits mailing list