-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Panic while formatting panic message + always_abort leads to stack overflow #122940
Copy link
Copy link
Open
Labels
A-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Example and initial analysis by @correabuscar:
The reason for this is that if both "panic while processing panic" and "panic after
always_abort" apply, then we use theAlwaysAbortcode path which does format the panic message.This could be fixed by moving this check further down below the
in_panic_hookcheck:rust/library/std/src/panicking.rs
Lines 393 to 395 in 9f25a04
But I don't know if this has other adverse side-effects. Can we even access thread-local variables after
fork(i.e., when always-abort is set)?Cc @Amanieu