Skip to content

test failures on POWER8 (ppc64le) #1045

Open

Description

@rathann

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.

Activity

  1. rathann commented on Apr 15, 2019

    @rathann
    ContributorAuthor

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

  2. rathann commented on Apr 15, 2019

    @rathann
    ContributorAuthor

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

  3. rathann commented on May 6, 2020

    @rathann
    ContributorAuthor

    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.
    
  4. rathann commented on Jul 15, 2020

    @rathann
    ContributorAuthor

    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.
    
  5. rathann commented on Jul 15, 2020

    @rathann
    ContributorAuthor

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

  6. rathann commented on May 14, 2021

    @rathann
    ContributorAuthor

    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.
    
  7. rathann commented on Aug 8, 2021

    @rathann
    ContributorAuthor

    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
    
  8. rathann commented on Aug 20, 2021

    @rathann
    ContributorAuthor

    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.

  9. rathann commented on Jun 16, 2023

    @rathann
    ContributorAuthor

    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.
    
  10. rathann commented on Sep 13, 2024

    @rathann
    ContributorAuthor

    With 1.0.36 and gcc 14.2.1, the following tests now pass:

    + test/spec/relaxed-simd/relaxed_madd_nmadd.txt
    + test/wasm2c/spec/conversions.txt
    + test/wasm2c/spec/simd_bit_shift.txt
    + test/wasm2c/spec/simd_f64x2_pmin_pmax.txt
    + test/wasm2c/spec/simd_i16x8_arith.txt
    

    Remaining failures:

    - test/spec/conversions.txt
    - test/spec/simd_conversions.txt
    - test/wasm2c/spec/simd_address.txt
    - test/wasm2c/spec/simd_f32x4_arith.txt
    - test/wasm2c/spec/simd_f32x4_pmin_pmax.txt
    - test/wasm2c/spec/simd_splat.txt
    
  11. rathann commented on Mar 4, 2025

    @rathann
    ContributorAuthor

    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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions