-
Notifications
You must be signed in to change notification settings - Fork 41
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
xx3::Hash64 output is not stable #92
Comments
Very surprising! Please provide runnable code (as text not a picture!) that reproduces the problem, including what version of the library is in use. It’s also useful to know what platform/cpu architecture you are on. |
/cc @flier |
Bump. Noticed no activity on this in a month, but pretty important to nail down imho. @usrtax can you provide the code as text? If not I can type it up. But at least, what cpu/arch you ran this on? Thanks. |
Also adding to this that I have experienced the same thing and came to the conclusion the xxh3 64 bit is unstable. Arch was a skylake xeon processor (aws c5 instance). So theres not repeated work I am making a reproducible example right now |
Update: I am trying to make a minimum example that fails using version 1.6.2 because that is the version I first encountered this bug on. The bad news is that I cannot get it to elicit this behavior. The reason the bug was hard to track down for me is that when I first wrote the code in my project all my tests were passing. It was when somebody added code elsewhere in the codebase that all of the sudden my tests started to sporadically fail. This is worrying to me as it sounds like actual undefined behavior which changes based on compilation. When I was experiencing the unstable output like the author I could get it to trigger with code as simple as: let mut hasher = twox_hash::xxh3::Hash64::default();
hasher.write(&bytes);
let first = hasher.finish();
let mut hasher2 = twox_hash::xxh3::Hash64::default();
hasher2.write(&bytes);
let second = hasher2.finish(); Hopefully @usrtax still has the code and its open source? His repo https://github.com/usrtax/xxhash-bug is empty :( |
I feel it has something to do with the nightly compiler, and I can't reproduce this problem after I upgrade the compiler once. I use xxhash-rust = {version="0.8.5",features=["xxh3"]} now |
the same val , but output different hash
The text was updated successfully, but these errors were encountered: