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

Bugfix: prevent corrupted buffer of encoder base on zero-copy encode #522

Closed
wants to merge 1 commit into from

Conversation

smattheis
Copy link

@smattheis smattheis commented Feb 9, 2018

This PR is an attempt to fix a problem of potentially corrupted byte buffers that can cause io threads to loop on the same out event infinitely and, consequently, to block/deadlock applications. For details, see issue #520

@smattheis
Copy link
Author

smattheis commented Feb 10, 2018

It seems that the first attempt broke the V1EncoderTest and V2EncoderTest. Therefore, I updated the patch now to use the condition toWrite > buffersize which didn't break local tests.

Further, please note that I have not checked if a similar bug may affect other parts of JeroMQ.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 82.907% when pulling 4d35ecd on bmwcarit:master into e2794da on zeromq:master.

@smattheis
Copy link
Author

The original issue is resolved by PR #525. I'm closing this PR respectively.

@smattheis smattheis closed this Feb 27, 2018
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.

None yet

2 participants