[compiler-rt] [scudo] Add errno description to mmap failure. (PR #87713)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 15:26:54 PDT 2024


================
@@ -25,9 +25,10 @@ namespace scudo {
 // Fatal internal map() error (potentially OOM related).
 void NORETURN reportMapError(uptr SizeIfOOM) {
   ScopedString Error;
-  Error.append("Scudo ERROR: internal map failure");
+  Error.append("Scudo ERROR: internal map failure (error desc=%s)",
+               strerror(errno));
   if (SizeIfOOM) {
-    Error.append(" (NO MEMORY) requesting %zuKB", SizeIfOOM >> 10);
+    Error.append(" requesting %zuKB", SizeIfOOM >> 10);
   }
----------------
ChiaHungDuan wrote:

nit: single-line statement can remove the braces

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


More information about the llvm-commits mailing list