-
Notifications
You must be signed in to change notification settings - Fork 100
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
valid
doesn't seem to work as expected with -O0
#459
Comments
My initial suspicion is that GHC somehow produces incorrect code for unordered-containers/Data/HashMap/Internal/Debug.hs Lines 72 to 149 in 813d57c
|
I don't understand why your tweaks were necessary. Shouldn't those hashes always be the same??? As for optimizations, I think there are some |
The optimizations I'm trying in #458 actually manipulate the key-hashes themselves, so they end up different from the stores hashes in the tree. This will need further cleanup to reduce confusion. See #458.
Ah, that's it! :) The default
|
I don't understand the optimization you're trying to do. The hashes change somehow?? |
Let me finish #458. That should clear things up. |
I ran into this issue while working on #458. I'm using the
sjakobi/valid-O0
branch to investigate.To reproduce:
The code used by
alterF
here is actually buggy (fixed in 1e8ca8c and 418aa71) so the test failure is expected.However if I run the same command and add
-O0
, we apparently get the same test case, butvalid
reports the resultingHashMap
s to beValid
:I've tried to increase the number of tests and the size of the test cases but I still can't get the testsuite to fail with
-O0
.I have tried to reproduce the shrunk failure case in GHCi but that's reported as
Valid
too.EDIT: I'm getting the same behaviour with GHC 8.2.2, so it doesn't seem to be a recent regression in GHC.
The text was updated successfully, but these errors were encountered: