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

Buffer-handling bug #2

Closed
luxagen opened this issue Sep 19, 2018 · 3 comments
Closed

Buffer-handling bug #2

luxagen opened this issue Sep 19, 2018 · 3 comments
Assignees

Comments

@luxagen
Copy link

luxagen commented Sep 19, 2018

I've just spent two days wondering why I couldn't get all the values generated by the library to match md5sum. I believe I've narrowed the problem down to a bug. Please see the attached image.

image

@luxagen
Copy link
Author

luxagen commented Sep 19, 2018

Sorry if this report comes across as terse or abrupt - I'm working like a dog trying to make a deadline right now :-)

@CommanderBubble
Copy link
Owner

Can you supply some values and the steps that you used to confirm this?
I've looked at it quickly and it all appears to make sense...

@CommanderBubble CommanderBubble self-assigned this Sep 20, 2018
@luxagen
Copy link
Author

luxagen commented Sep 20, 2018

I'm not sure I can explain the problem any more. Looking at the above again, it seems like a small write will either complete a block at the head of the function (in which case the tail section will stash what's left in the buffer), or it won't, causing the head and mid sections to skip and the new write to concatenate into the buffer. The only way to hit the zero assignment is for the input data to run out, in which case it must have been consumed by the head and mid sections. This must be my mistake - sorry for the false alarm.

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

No branches or pull requests

2 participants