EarlyOtherwiseBranch can insert storage markers incorrectly, creating use of a dead local #141212
Labels
A-mir-opt
Area: MIR optimizations
A-rustlantis
A miscompilation found by Rustlantis
C-bug
Category: This is a bug.
I-miscompile
Issue: Correct Rust code lowers to incorrect machine code
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Reduced example from rustlantis, which is accepted by Miri using Tree Borrows without optimizations enabled:
If I run this under Miri with
-Zmir-enable-passes=+EarlyOtherwiseBranch
, I see:The MIR diff for EarlyOtherwiseBranch is:
The text was updated successfully, but these errors were encountered: