[compiler-rt] [scudo] allocation_ring_buffer_size <= 0 disables buffer (PR #71791)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 02:49:07 PST 2023


fmayer wrote:

> `compiler-rt/lib/scudo/standalone/combined.h:1494`
> 
> Also this (to avoid mapping it as well)?
> 
> ```
> 1492   void mapAndInitializeRingBuffer() {
> 1493     u32 AllocationRingBufferSize =
> 1494         static_cast<u32>(getFlags()->allocation_ring_buffer_size);
> ////     Hoist this check up, and make it be |getFlags()->allocation_ring_buffer_size < 1| to avoid the
> ////     type punning?
> 1495     if (AllocationRingBufferSize < 1)
> 1496       return;
> 1497     MemMapT MemMap;
> 1498     MemMap.map(
> 1499         /*Addr=*/0U,
> 1500         roundUp(ringBufferSizeInBytes(AllocationRingBufferSize),
> ```

ah, yes. thanks

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


More information about the llvm-commits mailing list