Skip to content

Commit 05a4290

Browse files
authored
Update message for double allocation error
1 parent 8800809 commit 05a4290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ fn default_alloc_error_hook(layout: Layout) {
364364
// there is not enough memory to print a backtrace, although it could also mean that two
365365
// threads concurrently run out of memory.
366366
rtprintpanic!(
367-
"memory allocation of {} bytes failed while handling another memory allocation error\n",
367+
"memory allocation of {} bytes failed\nskipping backtrace printing to avoid potential recursion\n",
368368
layout.size()
369369
);
370370
return;

0 commit comments

Comments
 (0)