Skip to content
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

Don't call rust_begin_unwind #802

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

No description provided.

@tgross35 tgross35 force-pushed the no-rust-begin-unwind branch 7 times, most recently from c7127cb to 20a6f93 Compare March 19, 2025 03:35
`builtins-test-intrinsics` has long included a call to an unmangled
`rust_begin_unwind` (the name `rustc` gives the `#[panic_handler]`),
since [1], which I believe was intended to ensure panic machinery links
correctly. However, since [2], `rust_begin_unwind` is mangled and
unavailable for calling directly, which explains the recent CI failures.

Instead of calling the function directly, we can just panic; do so here.
Additionally, put this call behind `black_box(false)` rather than
unconditional, which means we can run the binary and ensure there are no
runtime issues.

[1]: rust-lang#360
[2]: rust-lang/rust#127173
@tgross35 tgross35 force-pushed the no-rust-begin-unwind branch from 20a6f93 to 3ed644a Compare March 19, 2025 03:40
@tgross35 tgross35 marked this pull request as draft March 19, 2025 03:46
@tgross35
Copy link
Contributor Author

Now I see why this was done rather than calling panic!() in the first place, looks like panic handling needs a lot more symbols (__CxxFrameHandler3, string.h, etc)

tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Mar 19, 2025
Since [1] this symbol is mangled, meaning it is not easy to call
directly. A better fix will come in [2] but for now, just disable that
portion of the test.

[1]: rust-lang/rust#127173
[2]: rust-lang#802
tgross35 added a commit that referenced this pull request Mar 19, 2025
Since [1] this symbol is mangled, meaning it is not easy to call
directly. A better fix will come in [2] but for now, just disable that
portion of the test.

[1]: rust-lang/rust#127173
[2]: #802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant