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