-
Notifications
You must be signed in to change notification settings - Fork 725
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
test failures on x86 32bit (i686) #1044
Comments
Interesting, I don't see the same behavior when I run locally (using |
This is on Fedora rawhide (development branch).
|
CXXFLAGS used: |
Interestingly,
|
Yes, #1046 only canonicalized NaNs. It looks like |
Testing w/ gcc in Compiler Explorer seems to produce the correct value too (negative zero). |
I don't know how faithful Compiler Explorer is and I'm no compiler expert. Two things may explain the difference:
I'm only guessing though. The issue is 100% reproducible on Fedora 29. |
I did some more builds and it looks like it's reproducible on Fedora 30 with gcc-9.0.1, too. |
Thanks for the info -- I'll get an image to test against. |
Meanwhile, I can no longer reproduce this on Fedora 30+. Fedora 29 is nearing end of life, so I don't think it's worth spending time on. |
Thanks for the update @rathann. |
The following 5 tests are still failing with 1.0.15 on i686 on Fedora 31 (gcc-9.3.1):
and I've got 5 new failures:
|
Still reproducible with 1.0.23 on Fedora rawhide. Same 10 failures are occurring. |
New failures on Fedora rawhide (36) with gcc-12 pre-release:
Log extract:
I'm not sure what's going on with spec/local_tee.txt, because @binji any clues? |
Some more failures in 1.0.30:
|
Two new test failures in 1.0.33 test suite on i686:
and
|
I'm seeing similar errors in https://github.com/turbolent/w2c2. Has anyone investigated why these tests fail? |
I think the root cause might be something like, "The SSE2 floating-point instructions largely conform to IEEE 754 (and the Wasm semantics wrt canonical/arithmetic NaNs), but x87 doesn't. So if somebody cares about i686 (which is a 32-bit x86 architecture without SSE2, so the compiler is generating x87 instructions for floating-point), the declarations file would need a lot more TLC to make the floating-point operations match the IEEE and Wasm semantics." If we just care about 32-bit x86 (but not necessarily the base i686) and are willing to restrict to chips that have SSE2 (e.g. Pentium-M, Pentium 4, and later), then compiling with If somebody cares about conforming to the spec exactly on pre-SSE2 32-bit x86, it would be helpful to have commit-by-commit CI on this architecture so we can avoid screwing it up in the future. And somebody will need access to a test machine and will have to do the work of adapting the declarations file to make it conform on x87. |
I wonder if we could #error out with a useful error message when building for x86 without SSE2? Perhaps with a link it this bug |
FWIW, Fedora has required SSE2 for years and we don't even build x86 32-bit kernels anymore. |
It's cool that Fedora's building WABT with those CFLAGS, but to get the wasm2c tests to build their output with those CFLAGS, I think they have to be added to the If that doesn't do the trick, then bigger picture, I think for this to get fixed, we'd probably need access to a test machine (and ideally commit-by-commit CI) with this architecture to figure out what's really going on and apply the necessary TLC to the declarations... :-/ |
Good point! I'll try that, thanks.
You can do this on any x86_64 with multiarch gcc and i686 flags. This could be set up in GitHub Actions to run in a 32bit Debian container, for example. Fedora x86_64 gcc is capable of building 32-bit binaries, too. |
New failure with 1.0.36:
|
FWIW, running the tests with |
Just got the same issue on debian wabt package, and
|
Running the 1.0.10 testsuite (
test/run-tests.py
) on x86 32bit (i686) yields the following failed tests:I suspect all but the first are due to lower float precision.
The text was updated successfully, but these errors were encountered: