Closed
Description
openedon Jul 12, 2022
The following example should both be UB, but Miri finds neither of it: (this got fixed by rust-lang/rust#104844)
fn main() {
let ptr = 32 as *const u8;
unsafe { let _ = *ptr; }
}
This is blocked on rust-lang/rust#99180.
Here's another variant: (that is not fixed yet, will be fixed by rust-lang/rust#103208)
fn main() {
let ptr = 32 as *const u8;
unsafe {
match *ptr { _ => {} }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment