miri genmc: fix exit() handling
In genmc mode, Miri does not want to stop execution when exit is called. Instead we want to continue running other threads to ensure we covered all possible concurrent behaviors (including the ones where the exiting thread was delayed so the other threads took their turns first). However, the core interpreter has a sanity check that prevents us from just doing nothing in exit. This leaves us in a pickle: there's nowhere we can jump to (exit has return type ! so there's no next block), but if we don't jump anywhere we ICE.
The first commit fixes that by disabling the sanity check when there is no block to jump to. That still catches the mistake of forgetting to jump for the vast majority of shims.
We currently don't build Miri's genmc integration in rustc CI so I had to hack the feature into the bootstrap miri integration. That turned out to use the wrong Miri binary, which is fixed by the second commit: we can just rely on CARGO_BIN_EXE_miri, there's no need for a MIRI environment variable.
r? @oli-obk
Some changes occurred to the CTFE machinery
cc @RalfJung, @oli-obk, @lcnr
The Miri subtree was changed
cc @rust-lang/miri
Some changes occurred to the CTFE / Miri interpreter
cc @rust-lang/miri
oli-obk is not on the review rotation at the moment.
They may take a while to respond.
@oli-obk anything I can do to move this along? :) Or should I find another reviewer?
The core interpreter changes are very small, just slightly weakening a sanity check that is getting in the way.
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.
@saethlin maybe you could take a look at this?
r? saethlin