-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miri's memcpy shim accepts programs that violate the C spec #2966
Comments
bors
added a commit
that referenced
this issue
Jul 5, 2023
C "memcpy" shim: ensure the pointers are valid Also add tests for some other shims that already behave correctly Fixes #2966
bors
added a commit
that referenced
this issue
Jul 6, 2023
C "memcpy" shim: ensure the pointers are valid Also add tests for some other shims that already behave correctly Fixes #2966
bors
added a commit
that referenced
this issue
Jul 6, 2023
C "memcpy" shim: ensure the pointers are valid Also add tests for some other shims that already behave correctly Fixes #2966
RalfJung
pushed a commit
to RalfJung/rust
that referenced
this issue
Jul 8, 2023
C "memcpy" shim: ensure the pointers are valid Also add tests for some other shims that already behave correctly Fixes rust-lang/miri#2966
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Miri implements
memcpy
as basically an alias ofcopy_nonoverlapping
. That's not correct though: according to the C spec,memcpy
is UB when the pointer is null or dangling, even if the copy is for 0 bytes. We should fix our shim.The text was updated successfully, but these errors were encountered: