-
Notifications
You must be signed in to change notification settings - Fork 296
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
Tests and fixes for remove_entry and remove_entry_mult #449
Tests and fixes for remove_entry and remove_entry_mult #449
Conversation
This is just a self contained test case, currently reproducing the panic of hyperium#446.
This comment has been minimized.
This comment has been minimized.
Also note that if I backport these tests to v0.1.19 (immediately before 82d53db, the seemingly most relevant change), the tests fail in a similar fashion, so this is a long standing bug. |
In order to remove extra values prior to remove_found, we must collect them eagerly. Eager collection is based on: commit 8ffe094 Author: Sean McArthur <sean@seanmonstar.com> AuthorDate: Mon Nov 25 17:34:30 2019 -0800 Commit: Sean McArthur <sean@seanmonstar.com> CommitDate: Tue Nov 26 10:03:09 2019 -0800 Make ValueDrain eagerly collect its extra values ...which was reverted in 6c2b789.
340ee18
to
e419939
Compare
Comparing Fixes #446 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work!
* add test case for OccupiedEntry::remove_entry_mult This is just a self contained test case, currently reproducing the panic of hyperium#446. * expand test cases for remove_entry_mult * add multiple remove_entry_mult call tests to show more issues * test repeated HeaderMap::remove for comparison * tests showing similar problem with remove_entry on extra values * fix remove_entry by moving remove_found after remove_all_extra_values * fix remove_entry_mult by eager collection of extras before remove_found In order to remove extra values prior to remove_found, we must collect them eagerly. Eager collection is based on: commit 8ffe094 Author: Sean McArthur <sean@seanmonstar.com> AuthorDate: Mon Nov 25 17:34:30 2019 -0800 Commit: Sean McArthur <sean@seanmonstar.com> CommitDate: Tue Nov 26 10:03:09 2019 -0800 Make ValueDrain eagerly collect its extra values ...which was reverted in 6c2b789. Closes hyperium#446
Initially this just adds test coverage for
header::OccupiedEntry::remove_entry_mult
, reproducing #446 and will fail CI.