Add regression test for #90815 and improve panicking() docs#151675
Add regression test for #90815 and improve panicking() docs#151675Airyshtoteles wants to merge 5 commits intorust-lang:mainfrom
panicking() docs#151675Conversation
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
This comment has been minimized.
This comment has been minimized.
6554fae to
4b2c9cd
Compare
4b2c9cd to
83ff440
Compare
This comment has been minimized.
This comment has been minimized.
83ff440 to
0a1f171
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
| /// This returns `true` if the current thread is currently panicking. This is | ||
| /// true during unwinding (when `panic = "unwind"`) and also during the | ||
| /// execution of the [panic hook] when `panic = "abort"`. |
There was a problem hiding this comment.
In fact, panic hooks will always be executed for both "abort" and "unwind", so panicking will return true inside a panic hook regardless of whether panic="abort" or panic="unwind" is set.
This revision appears to incorrectly imply that panicking returns true within panic hooks only when panic = "abort".
Nonetheless, I'm not a native English speaker, so please feel free to correct me if my understanding is wrong.
|
☔ The latest upstream changes (presumably #153377) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR contains two fixes:
1. Regression test for #90815
Adds a test to verify that rustc properly handles the case when inline assembly requests more registers than available (emitting an error instead of crashing with SIGSEGV). The underlying issue was fixed in LLVM.
2. Documentation improvement for #151458
Updates the documentation for
std::thread::panicking()to clarify that it returnstrueboth during unwinding (panic = "unwind") and during the execution of the panic hook (panic = "abort").Fixes #90815
Partially addresses #151458 (documentation aspect)