Closed
Description
This code shouldn't have UB but Miri reports UB and rustc generates a SIGILL:
#![feature(never_type)]
fn main() {
unsafe {
let x = 3u8;
let x: *const ! = &x as *const u8 as *const _;
let _ = *x;
}
}
Thanks to @Nadrieril for finding this.
Metadata
Metadata
Assignees
Labels
`#![feature(never_type)]`Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessHigh priorityRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.Relevant to the opsem teamThis issue requires a nightly compiler in some way.