File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -202,15 +202,15 @@ pub fn take_alloc_error_hook() -> fn(Layout) {
202
202
/// This lives in `libstd` so that we can call `dumb_print`.
203
203
///
204
204
/// This hook prints out a message like the default error hook,
205
- /// but then panics to generate a backtrace. If we are completely
206
- /// out of memory, panicking and/or backtrace generation may fail:
205
+ /// and then attempts to print a backtrace (without panicking).
206
+ /// If we are completely out of memory, backtrace generation may fail:
207
207
/// this is fine, since the backtrace is best-effort only. We
208
208
/// are guaranteed to print the actual error message, though.
209
209
#[ doc( hidden) ]
210
210
#[ unstable( feature = "alloc_internals" , issue = "0" ) ]
211
211
pub fn rustc_alloc_error_hook ( layout : Layout ) {
212
212
dumb_print ( format_args ! ( "memory allocation of {} bytes failed. backtrace:" , layout. size( ) ) ) ;
213
- panic ! ( ) ;
213
+ dumb_print ( format_args ! ( "{:?}" , crate :: backtrace :: Backtrace :: capture ( ) ) ) ;
214
214
}
215
215
216
216
fn default_alloc_error_hook ( layout : Layout ) {
You can’t perform that action at this time.
0 commit comments