Sign in
rust
/
miri
/
HEAD
/
.
/
tests
/
fail
/
dangling_pointers
/
out_of_bounds_write.rs
blob: f83601b44f8d3fc285a4d53609cb45946396171b [
file
] [
log
] [
blame
]
fn
main
()
{
let
mut
v
:
Vec
<
u16
>
=
vec
![
1
,
2
];
// This read is also misaligned. We make sure that the OOB message has priority.
unsafe
{
*
v
.
as_mut_ptr
().
wrapping_byte_add
(
5
)
=
0
};
//~ ERROR: attempting to access 2 bytes
}