Probable bug. Endless recursion in CompositeByteBuf#8758
Closed
doom369 wants to merge 1 commit intonetty:masterfrom
doom369:recursion
Closed
Probable bug. Endless recursion in CompositeByteBuf#8758doom369 wants to merge 1 commit intonetty:masterfrom doom369:recursion
doom369 wants to merge 1 commit intonetty:masterfrom
doom369:recursion
Conversation
|
Can one of the admins verify this patch? |
Member
Member
|
@doom369 can you also include a unit test ? |
njhill
approved these changes
Jan 23, 2019
Member
njhill
left a comment
There was a problem hiding this comment.
Errg, that's a nasty one.... thanks @doom369. Agree with @normanmaurer that we should have a unit test, if you don't want to add that I'd be happy to given it's my bug!
Contributor
Author
|
@njhill please do, you can submit fix + test in another PR. I'm not aware of this codebase, so it will take some time for me. |
njhill
added a commit
to njhill/netty
that referenced
this pull request
Jan 23, 2019
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.
Member
|
@normanmaurer @doom369 see #8773. Thanks again and sorry for the bugs! |
Member
|
Will be fixed by #8773 |
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.
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:
During review found strange code:
Seems like it was a typo and code should be
Introduced with #8437. FYI @njhill