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

Fully initialize the end of IO buffers #1040

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

divergentdave
Copy link
Collaborator

This writes bytes past the end of the last message in a segment (Cap or otherwise) to fully initialize the buffer. Initializing these bytes avoids UB from passing a partially initialized &[u8] to pwrite_all().

Fixes #1032.

This writes bytes past the end of the last message in a segment (Cap or
otherwise) to fully initialize the buffer. Initializing these bytes
avoids UB from passing a partially initialized &[u8] to pwrite_all().
Fixes spacejam#1032.
@spacejam
Copy link
Owner

Great work, @divergentdave :) This was a pretty legendary bugfix, considering all of the effort that has gone into miri support to discover the bug! I'm bragging about your work on this when I'm talking with friends, by the way! There's a blog post that will feature some of this that is in the works, and I'll keep you in the loop on that so you can get final sign-off on anything that talks about your work.

@spacejam spacejam merged commit 5462608 into spacejam:master Apr 23, 2020
@divergentdave divergentdave deleted the david_initialize_red_zone branch April 23, 2020 22:38
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.

Segment padding uninitialized memory problems
2 participants