-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Add regression test for #90815 and improve panicking() docs
#151675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0a1f171
95e926c
8c2336c
79da720
a8c598c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,71 @@ | ||||||||
| //@ add-minicore | ||||||||
| //@ build-fail | ||||||||
| //@ compile-flags: --target armv7-unknown-linux-gnueabihf | ||||||||
| //@ needs-llvm-components: arm | ||||||||
| //@ ignore-backends: gcc | ||||||||
|
|
||||||||
| // Regression test for issue #90815. | ||||||||
| // Ensure that we emit a proper error message when inline assembly requests | ||||||||
| // more registers than available, instead of crashing with a SIGSEGV. | ||||||||
|
|
||||||||
| #![feature(no_core)] | ||||||||
|
||||||||
| #![feature(no_core)] | |
| #![feature(no_core)] | |
| #![crate_type = "rlib"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| error: inline assembly requires more registers than available | ||
| --> $DIR/exhausted-registers-issue-90815.rs:38:10 | ||
| | | ||
| LL | "mov {0}, r0", | ||
| | ^^^^^^^^^^^ | ||
|
|
||
| error: aborting due to 1 previous error | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, panic hooks will always be executed for both "abort" and "unwind", so
panickingwill returntrueinside a panic hook regardless of whetherpanic="abort"orpanic="unwind"is set.This revision appears to incorrectly imply that
panickingreturnstruewithin panic hooks only whenpanic = "abort".Nonetheless, I'm not a native English speaker, so please feel free to correct me if my understanding is wrong.