Skip to content
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

Avoid passing null_mut() to ptr::offset. #20

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

sunfishcode
Copy link
Contributor

Split Chunk::mem_offset out of Chunk::to_mem, and use that to avoid
passing a null pointer to Chunk::to_mem, which calls ptr::offset,
which Miri diagnoses as Undefined Behavior.

Fixes #19.

Split `Chunk::mem_offset` out of `Chunk::to_mem`, and use that to avoid
passing a null pointer to `Chunk::to_mem`, which calls `ptr::offset`,
which Miri diagnoses as Undefined Behavior.

Fixes alexcrichton#19.
@alexcrichton alexcrichton merged commit dabe431 into alexcrichton:master Oct 4, 2021
@sunfishcode sunfishcode deleted the master branch August 25, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Miri test failure
2 participants