Fix three bugs in CompositeByteBuf#8773
Merged
normanmaurer merged 1 commit intonetty:4.1from Jan 24, 2019
Merged
Conversation
Motivation In netty#8758, @doom369 reported an infinite loop bug in CompositeByteBuf which was introduced in netty#8437. This is the same small fix for that, along with fixes for two other bugs found while re-inspecting the changes and adding unit tests. Modification - Replace recursive call to toComponentIndex with toComponentIndex0 as intended - Add missed "lastAccessed" racy cache invalidation in capacity(int) method - Fix incorrect determination of initial offset in non-zero cIndex case of updateComponentOffsets method - New unit tests for previously uncovered methods Results Fewer bugs.
|
Can one of the admins verify this patch? |
normanmaurer
approved these changes
Jan 24, 2019
Member
|
@netty-bot test this please |
normanmaurer
pushed a commit
that referenced
this pull request
Jan 24, 2019
Motivation In #8758, @doom369 reported an infinite loop bug in CompositeByteBuf which was introduced in #8437. This is the same small fix for that, along with fixes for two other bugs found while re-inspecting the changes and adding unit tests. Modification - Replace recursive call to toComponentIndex with toComponentIndex0 as intended - Add missed "lastAccessed" racy cache invalidation in capacity(int) method - Fix incorrect determination of initial offset in non-zero cIndex case of updateComponentOffsets method - New unit tests for previously uncovered methods Results Fewer bugs.
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.
Motivation
In #8758, @doom369 reported an infinite loop bug in
CompositeByteBufwhich was introduced in #8437.This is the same small fix for that, along with fixes for two other bugs (also introduced in #8437 😞) found while re-inspecting the changes and adding unit tests.
Modifications
toComponentIndexwithtoComponentIndex0as intendedlastAccessedracy cache invalidation incapacity(int)methodupdateComponentOffsetsmethodResults
Fewer bugs.