-
Notifications
You must be signed in to change notification settings - Fork 114
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
Incorrect and inconsistent behaviour using HashSet::into_iter #60
Comments
Running under valgrind I get the following error
I'm not sure of the exact cause but replacing the calls to |
Likely a bug in the unsafe chunk code which fails to initialise some allocated memory before use. This should be a fun one to track down... |
The |
I'm still not quite sure what was causing this, though Valgrind wasn't lying. I ended up simplifying the iterators in question, which got rid of the Valgrind warnings and the bug. As a bonus, iteration speed was probably increased by a tiny factor too. |
If this was reading undefined memory, should the problematic versions be yanked and maybe a security advisory be issued? |
I don't have any reason to believe it was reading uninitialised memory in any meaningful way, though I also didn't really find a satisfying answer to what was going on. The bug was manifesting in code from I'm still not disinclined to yank all minor versions previous to the fix, though... I think I'll go ahead and do that. |
The following code occasionally fails:
It seems values are sometimes skipped in the IntoInterator implementation of HashSet.
The behaviour is not consistent but 10000 iterations is usually enough to reproduce it, outputting something like
The text was updated successfully, but these errors were encountered: