Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
src
/
tools
/
miri
/
tests
/
fail-dep
/
libc
/
memchr_null.rs
blob: b6b4b62e6210743d661e0154696a0f4e17d0fc98 [
file
] [
log
] [
blame
]
use
std
::
ptr
;
// null is explicitly called out as UB in the C docs.
fn
main
()
{
unsafe
{
libc
::
memchr
(
ptr
::
null
(),
0
,
0
);
//~ERROR: null pointer
}
}