Skip to content

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

Merged
normanmaurer merged 1 commit into4.1from
write_seq_composite_wrapped
Jul 26, 2018
Merged

Leak detection combined with composite buffers results in incorrectly…#8153
normanmaurer merged 1 commit into4.1from
write_seq_composite_wrapped

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

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

… 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
Copy link
Copy Markdown
Member Author

@nitsanw FYI... thanks for reporting!

@normanmaurer normanmaurer added this to the 4.1.28.Final milestone Jul 26, 2018
Copy link
Copy Markdown
Member

@carl-mastrangelo carl-mastrangelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@carl-mastrangelo
Copy link
Copy Markdown
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)

@normanmaurer normanmaurer merged commit 9b08dbc into 4.1 Jul 26, 2018
@normanmaurer normanmaurer deleted the write_seq_composite_wrapped branch July 26, 2018 17:56
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants