Uh oh!
There was an error while loading. Please reload this page.
miri: ICE on invalid terminators - #69830
Conversation
rust-highfive
commented
Mar 8, 2020
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
jonas-schievink
commented
Mar 8, 2020
They get lowered by the generator transform, so if you run before that you'll still encounter them. If you run after it they should all be gone though. |
RalfJung
commented
Mar 8, 2020
Yeah we definitely run after that. |
matthewjasper
commented
Mar 8, 2020
|
RalfJung
commented
Mar 8, 2020
@matthewjasper Ah! Here's a Miri reproducer then: #![feature(unwind_attributes)]#[unwind(aborts)]fnpanic_abort(){panic!()}fnmain(){panic_abort();} |
RalfJung
commented
Mar 9, 2020
All right, I think this is ready now. |
This comment has been minimized.
This comment has been minimized.
6587938 to
8a8870fCompareoli-obk
commented
Mar 9, 2020
Shouldn't the abort intrinsic also forward to this new machine hook? You can probably run your miri repro under unleash, too. |
RalfJung
commented
Mar 9, 2020
So far the core Miri engine knows nothing about the abort intrinsic. You want to see it added to
Yeah but we don't actually support aborting in CTFE so I am not entirely sure about the point of that...^^ |
RalfJung
commented
Mar 9, 2020
I added the abort intrinsic. At some point we should probably just move all the intrinsics from Miri to here... well, all except atomics and those requiring host floating point maybe. |
oli-obk
commented
Mar 11, 2020
@bors r+ |
bors
commented
Mar 11, 2020
📌 Commit 911c75f has been approved by |
…=oli-obk miri: ICE on invalid terminators We've run a lot of MIR in Miri (including some generators) and never seen these. @tmandry is it correct that `Yield` and `GeneratorDrop` get lowered away? @eddyb@oli-obk what's with this `Abort` that does not seem to ever actually exist? Codegen *does* seem to handle it, so I wonder why Miri can get away without that. In fact, codegen handles it twice: https://github.com/rust-lang/rust/blob/1d5241c96208ca7d925442b1a5fa45ad18717a6f/src/librustc_codegen_ssa/mir/block.rs#L796https://github.com/rust-lang/rust/blob/1d5241c96208ca7d925442b1a5fa45ad18717a6f/src/librustc_codegen_ssa/mir/mod.rs#L296
…=oli-obk miri: ICE on invalid terminators We've run a lot of MIR in Miri (including some generators) and never seen these. @tmandry is it correct that `Yield` and `GeneratorDrop` get lowered away? @eddyb@oli-obk what's with this `Abort` that does not seem to ever actually exist? Codegen *does* seem to handle it, so I wonder why Miri can get away without that. In fact, codegen handles it twice: https://github.com/rust-lang/rust/blob/1d5241c96208ca7d925442b1a5fa45ad18717a6f/src/librustc_codegen_ssa/mir/block.rs#L796https://github.com/rust-lang/rust/blob/1d5241c96208ca7d925442b1a5fa45ad18717a6f/src/librustc_codegen_ssa/mir/mod.rs#L296
Rollup of 10 pull requests Successful merges: - #68899 (Add Display and Error impls for proc_macro::LexError) - #69011 (Document unsafe blocks in core::fmt) - #69674 (Rename DefKind::Method and TraitItemKind::Method ) - #69705 (Toolstate: remove redundant beta-week check.) - #69722 (Tweak output for invalid negative impl AST errors) - #69747 (Rename rustc guide) - #69792 (Implement Error for TryReserveError) - #69830 (miri: ICE on invalid terminators) - #69921 (rustdoc: remove unused import) - #69945 (update outdated comment) Failed merges: r? @ghost
miri engine: fix treatment of abort intrinsic I screwed up in rust-lang#69830 and added `abort` to the wrong block of intrinsics, namely the one that actually has a return place. So that branch was never actually reached. r? @oli-obk
We've run a lot of MIR in Miri (including some generators) and never seen these.
@tmandry is it correct that
YieldandGeneratorDropget lowered away?@eddyb@oli-obk what's with this
Abortthat does not seem to ever actually exist? Codegen does seem to handle it, so I wonder why Miri can get away without that. In fact, codegen handles it twice:rust/src/librustc_codegen_ssa/mir/block.rs
Line 796 in 1d5241c
rust/src/librustc_codegen_ssa/mir/mod.rs
Line 296 in 1d5241c