interpret: ensure that calls via no-unwind ABIs do not unwind - #161628
interpret: ensure that calls via no-unwind ABIs do not unwind#161628RalfJung wants to merge 1 commit into
Conversation
21d1c2a to
d1e3bca
Compare
|
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri
cc @rust-lang/miri Some changes occurred to the CTFE machinery |
|
r? @mati865 rustbot has assigned @mati865. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
d1e3bca to
1c53cd0
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
According to our ABI docs, programs like this are okay:
So let's add a test for that.
And also, let's adjust the checks in Miri's shims accordingly (see
src/tools/miri/src/shims/sig.rs). We used to reject calls to functions that might unwind with a signature that does not allow unwinding, even if no unwinding occurred. I don't think we have an actual example of a potentially-unwinding shim with an ABI that has a compatible ABI that does not allow unwinding ("C-unwind" and "C"), so we can't add a test for this.