-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-technical-debtArea: Internal cleanup workArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.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-langRelevant to the language teamRelevant to the language team
Description
rust/library/std/src/panicking.rs
Lines 707 to 714 in efb171e
if panics > 1 || !can_unwind { | |
// If a thread panics while it's already unwinding then we | |
// have limited options. Currently our preference is to | |
// just abort. In the future we may consider resuming | |
// unwinding or otherwise exiting the thread cleanly. | |
rtprintpanic!("thread panicked while panicking. aborting.\n"); | |
crate::sys::abort_internal(); | |
} |
At this point, I think we've effectively guaranteed in practice that a panicking while already unwinding leads to a full-process abort, and changing this to attempt to unwind the inner panic or even just to abort the thread but not the whole process is likely far to breaking. We're even considering making unwinds from drops always abort, though AIUI this cannot replace the panic while unwinding immediate abort check.
Best guess at appropriate labels...
@rustbot modify labels +T-compiler +T-lang +C-cleanup +A-technical-debt
peter-lyons-kehl
Metadata
Metadata
Assignees
Labels
A-technical-debtArea: Internal cleanup workArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.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-langRelevant to the language teamRelevant to the language team