2019-07-27 11:03:12 +02:00
|
|
|
// This should fail even without validation.
|
|
|
|
// compile-flags: -Zmiri-disable-validation
|
|
|
|
|
|
|
|
fn main() {
|
2020-04-11 09:30:13 +02:00
|
|
|
let x = 16usize as *const u32;
|
2020-05-01 14:43:59 +02:00
|
|
|
let _y = unsafe { &*x as *const u32 }; //~ ERROR inbounds test failed: 0x10 is not a valid pointer
|
2019-07-27 11:03:12 +02:00
|
|
|
}
|