[compiler-rt] [scudo] Handle failed mmap for allocation ring buffer (PR #71817)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 09:18:23 PST 2023
================
@@ -1501,6 +1503,11 @@ class Allocator {
getPageSizeCached()),
"scudo:ring_buffer");
RawRingBuffer = reinterpret_cast<char *>(MemMap.getBase());
+ if (RawRingBuffer == nullptr) {
+ Printf("Failed to allocate allocation ring buffer of size %d",
+ getFlags()->allocation_ring_buffer_size);
+ return;
----------------
ChiaHungDuan wrote:
Okay, I was thinking the case that if `allocation_ring_buffer_size` is too big, we may want to change a smaller number immediately instead of running the process for a while and then wonder why there's no stack stored.
No strong opinion here
https://github.com/llvm/llvm-project/pull/71817
More information about the llvm-commits
mailing list