2022-07-05 04:15:22 -05:00
|
|
|
//@error-pattern: pointer to 4 bytes starting at offset 0 is out-of-bounds
|
2019-11-14 03:23:29 -06:00
|
|
|
|
2022-06-21 13:27:44 -05:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let ptr = Box::into_raw(Box::new(0u16));
|
2022-07-16 22:40:36 -05:00
|
|
|
drop(Box::from_raw(ptr as *mut u32));
|
2022-06-21 13:27:44 -05:00
|
|
|
}
|
|
|
|
}
|