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

Leak detection combined with composite buffers results in incorrectly… #8153

Merged
merged 1 commit into from Jul 26, 2018

Conversation

Projects
None yet
3 participants
@normanmaurer
Copy link
Member

commented Jul 26, 2018

… 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.

Leak detection combined with composite buffers results in incorrectly…
… 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.
@normanmaurer

This comment has been minimized.

Copy link
Member Author

commented Jul 26, 2018

@nitsanw FYI... thanks for reporting!

@normanmaurer normanmaurer added this to the 4.1.28.Final milestone Jul 26, 2018

@carl-mastrangelo
Copy link
Member

left a comment

LGTM.

@carl-mastrangelo

This comment has been minimized.

Copy link
Member

commented Jul 26, 2018

@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)

@normanmaurer normanmaurer added the defect label Jul 26, 2018

@normanmaurer normanmaurer merged commit 9b08dbc into 4.1 Jul 26, 2018

1 check passed

continuous-integration/teamcity Finished TeamCity Build pull requests :: netty : Tests passed: 13846, ignored: 125
Details

@normanmaurer normanmaurer deleted the write_seq_composite_wrapped branch Jul 26, 2018

stef1927 added a commit to stef1927/netty that referenced this pull request Sep 3, 2018

Leak detection combined with composite buffers results in incorrectly…
… 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 added a commit to stef1927/netty that referenced this pull request Sep 3, 2018

Leak detection combined with composite buffers results in incorrectly…
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.