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

encoder: write out buffer before starting flush or finish #25

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

sunshowers
Copy link
Contributor

The problem here was that the buffer could still have some data in it at the
time it is overwritten. This would cause corruption, demonstrated by the
tests if run without the corresponding code changes.

None of the existing tests tested partial writes at all. To test this,
generalize WriteWithReject to also handle partial writes.

The problem here was that the buffer could still have some data in it at the
time it is overwritten.

None of the existing tests tested partial writes at all. To test this,
generalize `WriteWithReject` to also handle partial writes.
@sunshowers
Copy link
Contributor Author

FYI this is a critical corruption bug, so it would be good to have this landed and a new release made soonish.

@gyscos gyscos merged commit 3123e41 into gyscos:master Apr 12, 2017
@sunshowers
Copy link
Contributor Author

Thanks!

@sunshowers sunshowers deleted the flush-corrupt branch April 12, 2017 22:22
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.

2 participants