Repository: WebAssembly/wabt

Issue #2240: wasm2c/spec/simd_address.txt fails on non-x86
Created: 2023-05-25T19:58:59Z
When running the test suite of wabt-1.0.33 on aarch64 on Fedora 38, I get this (new) test failure:
- test/wasm2c/spec/simd_address.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,11 @@
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.33/test/run-spec-wasm2c.py", line 648, in <module>
  +    sys.exit(main(sys.argv[1:]))
  +             ^^^^^^^^^^^^^^^^^^
  +  File "/builddir/build/BUILD/wabt-1.0.33/test/run-spec-wasm2c.py", line 642, in main
  +    utils.Executable(main_exe, forward_stdout=True).RunWithArgs()
  +  File "/builddir/build/BUILD/wabt-1.0.33/test/utils.py", line 95, in RunWithArgs
  +    raise error
  +utils.Error: Error running "out/test/wasm2c/spec/simd_address/simd_address" (1):
  +None
  +out/test/wasm2c/spec/simd_address/simd_address-main.c:499: assertion failed: expected w2c_simd__address__1__wasm_v1280x2Eload_offset_65521(&simd__address__1__wasm_instance) to trap.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1 @@
  -42/42 tests passed.
  +41/42 tests passed.

Duplicate issue #1045: test failures on POWER8 (ppc64le)
Created: 2019-03-15T19:13:40Z
When building 1.0.10 on Fedora rawhide (development) with gcc-9.0.1 and RHEL/CentOS 7 with gcc-4.8.5, the following tests fail on POWER8 (ppc64le) architecture:
- test/spec/conversions.txt
  expected error code 0, got 2.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1,3 @@
  -401/401 tests passed.
  +out/test/spec/conversions.wast:348: expected result to be nan, got f64:nan
  +out/test/spec/conversions.wast:350: expected result to be nan, got f64:-nan
  +399/401 tests passed.
- test/wasm2c/spec/conversions.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,15 @@
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.10/test/run-spec-wasm2c.py", line 407, in <module>
  +    sys.exit(main(sys.argv[1:]))
  +  File "/builddir/build/BUILD/wabt-1.0.10/test/run-spec-wasm2c.py", line 400, in main
  +    forward_stdout=True).RunWithArgs()
  +  File "/builddir/build/BUILD/wabt-1.0.10/test/utils.py", line 104, in RunWithArgs
  +    raise error
  +utils.Error: Error running "out/test/wasm2c/spec/conversions/conversions":
  +conversions-main.c:1118: assertion failed: in Z_conversions_0Z_f64Z2Epromote_f32Z_df(make_nan_f32(0x200000)): expected result to be a arithmetic nan, got 0x0000000000000000.
  +conversions-main.c:1124: assertion failed: in Z_conversions_0Z_f64Z2Epromote_f32Z_df(-make_nan_f32(0x200000)): expected result to be a arithmetic nan, got 0x0000000000000000.
  +During handling of the above exception, another exception occurred:
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.10/test/run-spec-wasm2c.py", line 413, in <module>
  +    sys.stderr.write(u'{0}\n'.format(e).encode('ascii', 'replace'))
  +TypeError: write() argument must be str, not bytes
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1 @@
  -401/401 tests passed.
  +399/401 tests passed.

Additionally, the following tests fail only on RHEL/CentOS 7 with gcc-4.8.5:
- test/wasm2c/spec/f32.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,3 @@
  +Error running "out/test/wasm2c/spec/f32/f32":
  +f32-main.c:7733: assertion failed: in Z_f32_0Z_nearestZ_ff(-make_nan_f32(0x200000)): expected result to be a arithmetic nan, got 0xffa00000.
  +f32-main.c:7739: assertion failed: in Z_f32_0Z_nearestZ_ff(make_nan_f32(0x200000)): expected result to be a arithmetic nan, got 0x7fa00000.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1 @@
  -2500/2500 tests passed.
  +2498/2500 tests passed.
- test/wasm2c/spec/f64.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,3 @@
  +Error running "out/test/wasm2c/spec/f64/f64":
  +f64-main.c:7733: assertion failed: in Z_f64_0Z_nearestZ_dd(-make_nan_f64(0x4000000000000)): expected result to be a arithmetic nan, got 0x0000000000000000.
  +f64-main.c:7739: assertion failed: in Z_f64_0Z_nearestZ_dd(make_nan_f64(0x4000000000000)): expected result to be a arithmetic nan, got 0x0000000000000000.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1 @@
  -2500/2500 tests passed.
  +2498/2500 tests passed.

Closing comment (2025-03-04T22:59:45Z): New failure with 1.0.37 test suite:
- test/wasm2c/spec/memory64/simd_address.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1 @@
  +simd_address.wast:110: assertion failed: expected w2c_simd__address__1__wasm_v1280x2Eload_offset_65521(&simd__address__1__wasm_instance) to trap.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1 @@
  -42/42 tests passed.
  +41/42 tests passed.

Related to #2240 ?