Leak detection combined with composite buffers results in incorrectly…#8153
Merged
normanmaurer merged 1 commit into4.1from Jul 26, 2018
Merged
Leak detection combined with composite buffers results in incorrectly…#8153normanmaurer merged 1 commit into4.1from
normanmaurer merged 1 commit into4.1from
Conversation
… handled writerIndex when calling ByteBufUtil.writeAscii/writeUtf8 Motivation: We need to add special handling for WrappedCompositeByteBuf as these also extend AbstractByteBuf, otherwise we will not correctly adjust / read the writerIndex during processing. Modifications: - Add instanceof checks for WrappedCompositeByteBuf as well. - Add testcases Result: Fixes #8152.
Member
Author
|
@nitsanw FYI... thanks for reporting! |
Member
|
@normanmaurer Side note: I have some helper utilities I use for testing byte buffers. If I wanted to contribute them for you to use, where would they go? (They are JUnit Rules that wrap an allocator, making bufs allocated during the test to be auto cleaned up) |
bryce-anderson
approved these changes
Jul 26, 2018
stef1927
pushed a commit
to stef1927/netty
that referenced
this pull request
Sep 3, 2018
… handled writerIndex when calling ByteBufUtil.writeAscii/writeUtf8 (netty#8153) Motivation: We need to add special handling for WrappedCompositeByteBuf as these also extend AbstractByteBuf, otherwise we will not correctly adjust / read the writerIndex during processing. Modifications: - Add instanceof checks for WrappedCompositeByteBuf as well. - Add testcases Result: Fixes netty#8152.
stef1927
pushed a commit
to stef1927/netty
that referenced
this pull request
Sep 3, 2018
… handled writerIndex when calling ByteBufUtil.writeAscii/writeUtf8 (netty#8153) Motivation: We need to add special handling for WrappedCompositeByteBuf as these also extend AbstractByteBuf, otherwise we will not correctly adjust / read the writerIndex during processing. Modifications: - Add instanceof checks for WrappedCompositeByteBuf as well. - Add testcases Result: Fixes netty#8152.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… handled writerIndex when calling ByteBufUtil.writeAscii/writeUtf8
Motivation:
We need to add special handling for WrappedCompositeByteBuf as these also extend AbstractByteBuf, otherwise we will not correctly adjust / read the writerIndex during processing.
Modifications:
Result:
Fixes #8152.