[compiler-rt] [scudo] Handle failed mmap for allocation ring buffer (PR #71817)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 10:55:37 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:

I think this is initialized pretty early. If it fails in the buffer preparation, we may want to abort and see what's wrong here?

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


More information about the llvm-commits mailing list