diff options
| author | Ralf Jung <post@ralfj.de> | 2023-08-27 20:02:46 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-08-27 20:02:46 +0200 |
| commit | 1087e90a2e131cef7d6d361182585d0e3ae12dc3 (patch) | |
| tree | 16f7efc2f54ab472ac034032c8df89ef4fcb21b6 /library/alloc | |
| parent | b60f7b51a27dfd9cbc5ecaa56ee679cd1b67f4c4 (diff) | |
| download | rust-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.rs | 7 |
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, + ) } } } |
