[compiler-rt] [scudo] Allow to resize allocation ring buffer (PR #82683)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 14:28:27 PST 2024


================
@@ -1564,11 +1570,11 @@ class Allocator {
                   UINTPTR_MAX);
 
     if (AllocationRingBufferSize > kMaxU32Pow2 / kStacksPerRingBufferEntry)
-      return;
+      return false;
     u32 TabSize = static_cast<u32>(roundUpPowerOfTwo(kStacksPerRingBufferEntry *
                                                      AllocationRingBufferSize));
     if (TabSize > UINT32_MAX / kFramesPerStack)
-      return;
+      return false;
     u32 RingSize = static_cast<u32>(TabSize * kFramesPerStack);
     DCHECK(isPowerOfTwo(RingSize));
----------------
ChiaHungDuan wrote:

This should be a real check

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


More information about the llvm-commits mailing list