Sign in
android
/
toolchain
/
rustc
/
refs/heads/rust-1.73.0
/
.
/
src
/
tools
/
miri
/
tests
/
fail
/
shims
/
memchr_null.rs
blob: 6bc7af7e6bf774f53fa72d05c43e5cec06e545bf [
file
] [
log
] [
blame
]
//@ignore-target-windows: No libc on Windows
use
std
::
ptr
;
// null is explicitly called out as UB in the C docs.
fn
main
()
{
unsafe
{
libc
::
memchr
(
ptr
::
null
(),
0
,
0
);
//~ERROR: dangling
}
}