wabt icon indicating copy to clipboard operation
wabt copied to clipboard

test failures on POWER8 (ppc64le)

Open rathann opened this issue 6 years ago • 11 comments

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.

rathann avatar Mar 15 '19 19:03 rathann

#1046 fixes test/spec/conversions.txt and test/spec/nontrapping-float-to-int-conversions/conversions.txt

rathann avatar Apr 15 '19 12:04 rathann

test/wasm2c/spec/conversions.txt, test/wasm2c/spec/f32.txt and test/wasm2c/spec/f64.txt are still failing.

rathann avatar Apr 15 '19 12:04 rathann

It looks like the two failures fixed with #1046 are back with 1.0.15 on Fedora 31/gcc-9.3.1:

- test/spec/conversions.txt
  expected error code 0, got 2.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -65,6 +65,8 @@
   out/test/spec/conversions.wast:240: assert_trap passed: invalid conversion to integer
   out/test/spec/conversions.wast:241: assert_trap passed: invalid conversion to integer
   out/test/spec/conversions.wast:242: assert_trap passed: invalid conversion to integer
  +out/test/spec/conversions.wast:358: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:nan
  +out/test/spec/conversions.wast:360: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:-nan
   out/test/spec/conversions.wast:475: assert_invalid passed:
     error: type mismatch in i32.wrap_i64, expected [i64] but got [f32]
     000001e: error: OnConvertExpr callback failed
  @@ -140,4 +142,4 @@
   out/test/spec/conversions.wast:499: assert_invalid passed:
     error: type mismatch in f64.reinterpret_i64, expected [i64] but got [i32]
     000001b: error: OnConvertExpr callback failed
  -434/434 tests passed.
  +432/434 tests passed.
...
- test/spec/nontrapping-float-to-int-conversions/conversions.txt
  expected error code 0, got 2.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -65,6 +65,8 @@
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:248: assert_trap passed: invalid conversion to integer
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:249: assert_trap passed: invalid conversion to integer
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:250: assert_trap passed: invalid conversion to integer
  +out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:557: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:nan
  +out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:559: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:-nan
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:674: assert_invalid passed:
     error: type mismatch in i32.wrap_i64, expected [i64] but got [f32]
     000001e: error: OnConvertExpr callback failed
  @@ -140,4 +142,4 @@
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:698: assert_invalid passed:
     error: type mismatch in f64.reinterpret_i64, expected [i64] but got [i32]
     000001b: error: OnConvertExpr callback failed
  -614/614 tests passed.
  +612/614 tests passed.

rathann avatar May 06 '20 22:05 rathann

Still failing with 1.0.17 on Fedora 31/ppc64le, gcc-9.3.1:

- test/spec/conversions.txt
  expected error code 0, got 2.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -65,6 +65,8 @@
   out/test/spec/conversions.wast:248: assert_trap passed: invalid conversion to integer
   out/test/spec/conversions.wast:249: assert_trap passed: invalid conversion to integer
   out/test/spec/conversions.wast:250: assert_trap passed: invalid conversion to integer
  +out/test/spec/conversions.wast:557: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:nan
  +out/test/spec/conversions.wast:559: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:-nan
   out/test/spec/conversions.wast:674: assert_invalid passed:
     error: type mismatch in i32.wrap_i64, expected [i64] but got [f32]
     000001e: error: OnConvertExpr callback failed
  @@ -140,4 +142,4 @@
   out/test/spec/conversions.wast:698: assert_invalid passed:
     error: type mismatch in f64.reinterpret_i64, expected [i64] but got [i32]
     000001b: error: OnConvertExpr callback failed
  -614/614 tests passed.
  +612/614 tests passed.
...
- test/spec/nontrapping-float-to-int-conversions/conversions.txt
  expected error code 0, got 2.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -65,6 +65,8 @@
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:248: assert_trap passed: invalid conversion to integer
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:249: assert_trap passed: invalid conversion to integer
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:250: assert_trap passed: invalid conversion to integer
  +out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:557: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:nan
  +out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:559: mismatch in result 0 of assert_return: expected f64:nan:arithmetic, got f64:-nan
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:674: assert_invalid passed:
     error: type mismatch in i32.wrap_i64, expected [i64] but got [f32]
     000001e: error: OnConvertExpr callback failed
  @@ -140,4 +142,4 @@
   out/test/spec/nontrapping-float-to-int-conversions/conversions.wast:698: assert_invalid passed:
     error: type mismatch in f64.reinterpret_i64, expected [i64] but got [i32]
     000001b: error: OnConvertExpr callback failed
  -614/614 tests passed.
  +612/614 tests passed.

rathann avatar Jul 15 '20 11:07 rathann

I'm getting identical failures on Fedora 32 and rawhide (devel) with gcc-10.1.1.

rathann avatar Jul 15 '20 11:07 rathann

New failure in 1.0.23 - test/spec/simd/simd_conversions.txt:

- test/spec/simd/simd_conversions.txt
  expected error code 0, got 2.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1,3 +1,9 @@
  +out/test/spec/simd/simd_conversions.wast:63: mismatch in lane 0 of result 0 of assert_return: expected f64:nan:arithmetic, got f64:nan
  +out/test/spec/simd/simd_conversions.wast:63: mismatch in lane 1 of result 0 of assert_return: expected f64:nan:arithmetic, got f64:nan
  +out/test/spec/simd/simd_conversions.wast:63: mismatch in result 0 of assert_return: expected v128 f64:nan:arithmeticf64:nan:arithmetic, got v128 i32x4:0x00000000 0x7ff40000 0x00000000 0x7ff40000
  +out/test/spec/simd/simd_conversions.wast:67: mismatch in lane 0 of result 0 of assert_return: expected f64:nan:arithmetic, got f64:-nan
  +out/test/spec/simd/simd_conversions.wast:67: mismatch in lane 1 of result 0 of assert_return: expected f64:nan:arithmetic, got f64:-nan
  +out/test/spec/simd/simd_conversions.wast:67: mismatch in result 0 of assert_return: expected v128 f64:nan:arithmeticf64:nan:arithmetic, got v128 i32x4:0x00000000 0xfff40000 0x00000000 0xfff40000
   out/test/spec/simd/simd_conversions.wast:605: assert_malformed passed:
     out/test/spec/simd/simd_conversions/simd_conversions.1.wat:1:22: error: unexpected token "i32x4.trunc_sat_f32x4", expected an instr.
     (func (result v128) (i32x4.trunc_sat_f32x4 (v128.const f32x4 0.0 0.0 0.0 0.0)))
  @@ -172,4 +178,4 @@
   out/test/spec/simd/simd_conversions.wast:893: assert_invalid passed:
     error: type mismatch in i16x8.narrow_i32x4_u, expected [v128, v128] but got []
     000001b: error: OnBinaryExpr callback failed
  -280/280 tests passed.
  +278/280 tests passed.

rathann avatar May 14 '21 13:05 rathann

3 failures still reproducible in 1.0.23 on Fedora rawhide:

test/spec/conversions.txt
test/spec/simd/simd_conversions.txt
test/wasm2c/spec/conversions.txt

rathann avatar Aug 08 '21 22:08 rathann

And additional two on RHEL/CentOS 7 with gcc-10.2.1:

- test/wasm2c/spec/f32.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,10 @@
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.24/test/run-spec-wasm2c.py", line 437, in <module>
  +    sys.exit(main(sys.argv[1:]))
  +  File "/builddir/build/BUILD/wabt-1.0.24/test/run-spec-wasm2c.py", line 431, in main
  +    forward_stdout=True).RunWithArgs()
  +  File "/builddir/build/BUILD/wabt-1.0.24/test/utils.py", line 103, in RunWithArgs
  +    raise error
  +utils.Error: Error running "out/test/wasm2c/spec/f32/f32":
  +f32-main.c:7762: assertion failed: in Z_f32_0Z_nearestZ_ff(-make_nan_f32(0x200000)): expected result to be a arithmetic nan, got 0xffa00000.
  +f32-main.c:7768: 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,10 @@
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.24/test/run-spec-wasm2c.py", line 437, in <module>
  +    sys.exit(main(sys.argv[1:]))
  +  File "/builddir/build/BUILD/wabt-1.0.24/test/run-spec-wasm2c.py", line 431, in main
  +    forward_stdout=True).RunWithArgs()
  +  File "/builddir/build/BUILD/wabt-1.0.24/test/utils.py", line 103, in RunWithArgs
  +    raise error
  +utils.Error: Error running "out/test/wasm2c/spec/f64/f64":
  +f64-main.c:7762: assertion failed: in Z_f64_0Z_nearestZ_dd(-make_nan_f64(0x4000000000000)): expected result to be a arithmetic nan, got 0x0000000000000000.
  +f64-main.c:7768: 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.

These are the same as with gcc-4.8.5 before, so I guess this might be an issue with old glibc or kernel on RHEL/CentOS 7.

rathann avatar Aug 20 '21 13:08 rathann

New ones in 1.0.33 (tested on Fedora 38+). I'm not sure why they occur, because I don't see any difference in the expected and actual outputs.

- test/wasm2c/spec/simd_splat.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_splat/simd_splat" (1):
  +None
  +out/test/wasm2c/spec/simd_splat/simd_splat-main.c:522: assertion failed: in w2c_simd__splat__0__wasm_f32x40x2Esplat(&simd__splat__0__wasm_instance, make_nan_f32(0x000001)): expected <nan nan nan nan >, got <nan nan nan nan >.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1 @@
- test/wasm2c/spec/simd_f32x4_arith.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,12 @@
  +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_f32x4_arith/simd_f32x4_arith" (1):
  +None
  +out/test/wasm2c/spec/simd_f32x4_arith/simd_f32x4_arith-main.c:5655: assertion failed: in w2c_simd__f32x4__arith__0__wasm_f32x40x2Eneg(&simd__f32x4__arith__0__wasm_instance, simde_wasm_f32x4_make(make_nan_f32(0x200000),make_nan_f32(0x200000),make_nan_f32(0x200000),make_nan_f32(0x200000))): expected <-nan -nan -nan -nan >, got <-nan -nan -nan -nan >.
  +out/test/wasm2c/spec/simd_f32x4_arith/simd_f32x4_arith-main.c:5658: assertion failed: in w2c_simd__f32x4__arith__0__wasm_f32x40x2Eneg(&simd__f32x4__arith__0__wasm_instance, simde_wasm_f32x4_make(-make_nan_f32(0x200000),-make_nan_f32(0x200000),-make_nan_f32(0x200000),-make_nan_f32(0x200000))): expected <nan nan nan nan >, got <nan nan nan nan >.
  STDOUT MISMATCH:
  --- expected
  +++ actual
  @@ -1 +1 @@
  -1803/1803 tests passed.
  +1801/1803 tests passed.

rathann avatar Jun 16 '23 14:06 rathann