-
Notifications
You must be signed in to change notification settings - Fork 38.7k
fuzz: Remove incorrect float round-trip serialization test #21929
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
Conversation
|
@elichai on 32-bit you can reproduce this yourself in a few seconds: |
That URL is not publicly accessible. I think you forgot to make it public :) |
|
I don't plan to make them public, but instead try to include all relevant information in the pull request itself. A bot will make them public the day after they are fixed. |
|
What is the reason that the input file FWIW:
OK, then it works as intended :) |
I have no idea, while it might be interesting to know, this isn't relevant to this pull.
Any of the reasons above is enough to remove the test here. Feel free to pick just the ones you like. |
|
For example |
|
Though it is somehow surprising to see here (this does nothing with the value, just memcpying), FPU operations are not guaranteed to keep the bit pattern the same. Even if that is just loading a value and storing it again. To be honest I wish we could get rid of floating point in the serialization code completely. Anyhow, ACK fae814c |
…ation test fae814c fuzz: Remove incorrect float round-trip serialization test (MarcoFalke) Pull request description: It tests the wrong way of the round-trip: `int -> float -> int`, but only `float -> int -> float` is allowed and used. See also `src/test/fuzz/float.cpp`. Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34118 ACKs for top commit: laanwj: Anyhow, ACK fae814c Tree-SHA512: 8412a7985be2225109f382b7c7ea6d6fcfbea15711671fdf2f41dd1a9adbb3b4489592863751d78bedaff98e9b0b13571d9cae06ffd92db8fbf7ce0f47874a41
|
Post-merge ACK fae814c I'd love to understand exactly why the assertion failure is 32-bit only but so far I've been unsuccessful at recreating this issue locally which rules out any in-depth practical investigation. |
|
This is trivial to reproduce locally: |
|
Is it just NaNs that get changed? Because that's not unexpected. For non-NaN it would surprise me |
|
I should have printed in order. It is
|
|
@MarcoFalke This may be a result of 32-bit code using 387 instructions, and 64-bit code using SSE instructions for floating point. They may not behave identically. If you're really curious, you could try compiling with -mfpmath=387 in 64-bit mode, or with -mfpath=sse -msse ib 32-bit mode. |
|
Thanks @MarcoFalke. I didn't catch that the assertion failure was FWIW: |
|
|
Assertion failures: Other combinations of |
…ation test fae814c fuzz: Remove incorrect float round-trip serialization test (MarcoFalke) Pull request description: It tests the wrong way of the round-trip: `int -> float -> int`, but only `float -> int -> float` is allowed and used. See also `src/test/fuzz/float.cpp`. Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34118 ACKs for top commit: laanwj: Anyhow, ACK fae814c Tree-SHA512: 8412a7985be2225109f382b7c7ea6d6fcfbea15711671fdf2f41dd1a9adbb3b4489592863751d78bedaff98e9b0b13571d9cae06ffd92db8fbf7ce0f47874a41
It tests the wrong way of the round-trip:
int -> float -> int, but onlyfloat -> int -> floatis allowed and used. See alsosrc/test/fuzz/float.cpp.Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34118