thread::scope
clobbers the panic payload
#139017
Labels
A-panic
Area: Panicking machinery
A-thread
Area: `std::thread`
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: the panic payload from the scoped thread should be forwarded to the main thread using
panic::resume_unwind
. The payload passed topanic!
inside the scope should be retrievable there, and there should not be any additional panics.Instead, this happened: a second panic with no link to the original is caused by the
thread::scope
implementation, and the payload is a meaningless "a scoped thread panicked" message.Meta
rustc --version --verbose
:beta and nightly also behave like this
The text was updated successfully, but these errors were encountered: