-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
Labels
A-interpreterArea: affects the core interpreterArea: affects the core interpreterI-wrongImpact: makes Miri produce incorrect program behaviorImpact: makes Miri produce incorrect program behavior
Description
The following program works fine at runtime but panics in Miri:
fn f(one: f64) -> f64 {
(-1.0) % one
}
fn main() {
let black_box_one = (std::env::args().len()) as f64;
let result_rt = f(black_box_one);
assert!(result_rt.is_sign_negative());
}
This is basically the Miri version of rust-lang/rust#102403, leading to incorrect execution. It's similar to rust-lang/rust#100233 (likely an apfloat porting bug) but a lot harder to work around...
Metadata
Metadata
Assignees
Labels
A-interpreterArea: affects the core interpreterArea: affects the core interpreterI-wrongImpact: makes Miri produce incorrect program behaviorImpact: makes Miri produce incorrect program behavior