-
Notifications
You must be signed in to change notification settings - Fork 210
Bug: IndexMap fails to insert more than u16::MAX keys. #579
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
Comments
I see that the new release |
I noticed that the code path with exit if dist is too long in find Line 186 in 6b17767
|
I tried in a fork to replace u16 by u32 for the hash and pos, and it seems to work. So I guess it is possible to make a smarter system based on the size of the Also, even if this is too much work there is a quick fix solution, that doesn't solve the problem but at least warn people about the issue would be to add an Line 735 in 6b17767
|
Uh oh!
There was an error while loading. Please reload this page.
I ran into this bug when inserting a lot of keys in an IndexMap, and it turns out that when my keys are bigger than an u16 they are not inserted properly. Here is a minimal reproducible code.
I have no idea on why this happens. Does anyone have an idea ?
EDIT: the issue is not the values but the number of keys to insert shifting the start and end of the loop leads to the same bug
EDIT 2: the bug is present in the 0.8.0 version but fixed in 0.9.0 and on the latest commit on master.EDIT 3: the bug is not fixed in any versions
The text was updated successfully, but these errors were encountered: