Sign in
fuchsia
/
third_party
/
rust
/
d2b0555964913073a2680739e8678bab4b7850ed
/
.
/
src
/
tools
/
miri
/
tests
/
fail-dep
/
libc
/
realloc-zero.rs
blob: 0e210f313569a04fa84d445b621b9d0e128e268e [
file
] [
log
] [
blame
]
fn
main
()
{
unsafe
{
let
p1
=
libc
::
malloc
(
20
);
// C made this UB...
let
p2
=
libc
::
realloc
(
p1
,
0
);
//~ERROR: `realloc` with a size of zero
assert
!(
p2
.
is_null
());
}
}