wabt icon indicating copy to clipboard operation
wabt copied to clipboard

test/wasm2c/spec/skip-stack-guard-page.txt fails on 32-bit ARM

Open rathann opened this issue 5 years ago • 8 comments

I'm getting this test failure when running 1.0.13 test suite on ARM:

- test/wasm2c/spec/skip-stack-guard-page.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,14 @@
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.13/test/run-spec-wasm2c.py", line 421, in <module>
  +    sys.exit(main(sys.argv[1:]))
  +  File "/builddir/build/BUILD/wabt-1.0.13/test/run-spec-wasm2c.py", line 413, in main
  +    utils.Executable(os.path.join(out_dir, main_exe),
  +  File "/builddir/build/BUILD/wabt-1.0.13/test/utils.py", line 104, in RunWithArgs
  +    raise error
  +utils.Error: Signal raised running "out/test/wasm2c/spec/skip-stack-guard-page/skip-stack-guard-page": SIGSEGV
  +b''
  +During handling of the above exception, another exception occurred:
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.13/test/run-spec-wasm2c.py", line 427, 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 +0,0 @@
  -10/10 tests passed.

Any idea what's going on here?

rathann avatar Mar 20 '20 22:03 rathann

The main issue is the SIGSEGV; the python traceback happens because of a python2/python3 issue (which has since been resolved, since we've switched to python3 everywhere.)

I'm guessing the segfault is from a stack overflow. I ran into a similar issue when trying to get the MSVC build of wasm2c working too. Unfortunately, that hasn't landed yet.

binji avatar Mar 20 '20 23:03 binji

I'm getting a failure here on i686, too (with 1.0.17 on Fedora 31):

- test/wasm2c/spec/skip-stack-guard-page.txt
  expected error code 0, got 1.
  STDERR MISMATCH:
  --- expected
  +++ actual
  @@ -0,0 +1,9 @@
  +Traceback (most recent call last):
  +  File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
  +    sys.exit(main(sys.argv[1:]))
  +  File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
  +    forward_stdout=True).RunWithArgs()
  +  File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
  +    raise error
  +utils.Error: Signal raised running "out/test/wasm2c/spec/skip-stack-guard-page/skip-stack-guard-page": SIGABRT
  +mmap failed: Invalid argument

rathann avatar Jul 15 '20 10:07 rathann

Looks like it was only due to the new signal handler. It's still ARM 32bit-only, after all.

rathann avatar Jul 16 '20 10:07 rathann

Still getting the SIGSEGV on ARM 32-bit with 1.0.23 on Fedora rawhide.

rathann avatar Aug 08 '21 22:08 rathann

FWIW, Fedora is dropping support for ARM 32-bit starting with Fedora 37. The next release, Fedora 36, will be the last to run on ARM 32-bit. I guess this can be left unfixed. For the record, these are the tests failing on ARM 32-bit with 1.0.27:

dump/reference-types.txt
dump/relocations-all-features.txt
dump/relocations.txt
dump/table.txt
wasm2c/spec/skip-stack-guard-page.txt

rathann avatar Mar 15 '22 23:03 rathann

I'll mark as help wanted in case anyone with access to arm32 wants to take a stab a fixing this.

sbc100 avatar Mar 15 '22 23:03 sbc100

Only the wasm2c/spec/skip-stack-guard-page.txt test is failing in 1.0.28.

rathann avatar Apr 04 '22 21:04 rathann

Same in 1.0.32. Note that I'll stop testing on ARM 32-bit in about 6 months, when Fedora 36 becomes EOL.

rathann avatar Jan 03 '23 18:01 rathann