-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
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/SoundnessT-langRelevant to the language teamRelevant to the language team
Description
This code crashes:
#[no_mangle] pub static X: usize = 0;
mod test {
extern {
pub static X: &'static u32;
}
}
fn main() {
println!("{}", X);
println!("{}", *test::X);
}
@ubsan wrote this code on irc.
https://botbot.me/mozilla/rust-internals/2016-07-28/?msg=70411962&page=5
Metadata
Metadata
Assignees
Labels
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/SoundnessT-langRelevant to the language teamRelevant to the language team