[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
================
@@ -1535,11 +1537,15 @@ class Allocator {
RBEntryStart)[N];
}
- void mapAndInitializeRingBuffer() {
- if (getFlags()->allocation_ring_buffer_size <= 0)
- return;
- u32 AllocationRingBufferSize =
- static_cast<u32>(getFlags()->allocation_ring_buffer_size);
+ bool mapAndInitializeRingBuffer(int RingBufferSize) {
+ if (RingBufferSize < 0 ||
+ static_cast<unsigned int>(RingBufferSize) >= UINT32_MAX)
----------------
ChiaHungDuan wrote:
This condition won't be triggered. What's the limit of the `RingBufferSize`?
https://github.com/llvm/llvm-project/pull/82683
More information about the llvm-commits
mailing list