about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-08-27 20:02:46 +0200
committerRalf Jung <post@ralfj.de>2023-08-27 20:02:46 +0200
commit1087e90a2e131cef7d6d361182585d0e3ae12dc3 (patch)
tree16f7efc2f54ab472ac034032c8df89ef4fcb21b6 /library/alloc
parentb60f7b51a27dfd9cbc5ecaa56ee679cd1b67f4c4 (diff)
downloadrust-1087e90a2e131cef7d6d361182585d0e3ae12dc3.tar.gz
rust-1087e90a2e131cef7d6d361182585d0e3ae12dc3.zip
avoid triple-backtrace due to panic-during-cleanup
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/alloc.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs
index 5205ed9fb50..2c9248aaccd 100644
--- a/library/alloc/src/alloc.rs
+++ b/library/alloc/src/alloc.rs
@@ -395,9 +395,10 @@ pub mod __alloc_error_handler {
         if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
             panic!("memory allocation of {size} bytes failed")
         } else {
-            core::panicking::panic_nounwind_fmt(format_args!(
-                "memory allocation of {size} bytes failed"
-            ))
+            core::panicking::panic_nounwind_fmt(
+                format_args!("memory allocation of {size} bytes failed"),
+                /* force_no_backtrace */ false,
+            )
         }
     }
 }