[compiler-rt] [asan] Throw std::bad_alloc from operator new on allocation failure (PR #196388)

Justin T. Gibbs via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 18:48:08 PDT 2026


================
@@ -181,7 +195,8 @@ if(NOT APPLE)
     ARCHS ${ASAN_SUPPORTED_ARCH}
     SOURCES ${ASAN_CXX_SOURCES}
     ADDITIONAL_HEADERS ${ASAN_HEADERS}
-    CFLAGS ${ASAN_CFLAGS}
+    # asan_new_delete.cpp needs -fexceptions to throw bad_alloc on OOM.
----------------
scsiguy wrote:

Fixed.

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


More information about the llvm-commits mailing list