- Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
F-never_type`#![feature(never_type)]``#![feature(never_type)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-opsemRelevant to the opsem teamRelevant to the opsem teamrequires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
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
F-never_type`#![feature(never_type)]``#![feature(never_type)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-opsemRelevant to the opsem teamRelevant to the opsem teamrequires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.