evm2wasm icon indicating copy to clipboard operation
evm2wasm copied to clipboard

manyFunctions100 vmtest failing

Open lrettig opened this issue 6 years ago • 3 comments

This one test is failing in the current master branch (https://github.com/ewasm/evm2wasm/commit/e050d24f9d930cb963d25470490bae6b019a29ab):

evm2wasm/ master> npm run vmTests
> [email protected] vmTests /Users/lanerettig/wip/eth/evm2wasm
> node --expose-wasm --harmony ./tests/runVmTests.js
TAP version 13
# VMTESTS
...
# manyFunctions100 manyFunctions100
not ok 1425 Error: Command failed: /Users/lanerettig/wip/eth/evm2wasm/tools/wabt/bin/wat2wasm /Users/lanerettig/wip/eth/evm2wasm/tmp/manyFunctions100.wast -o /Users/lanerettig/wip/eth/evm2wasm/tmp/manyFunctions100.wasm
  ---
    operator: fail
    at: runner.catch.err (/Users/lanerettig/wip/eth/evm2wasm/tests/runVmTests.js:171:9)
    stack: |-
      Error: Error: Command failed: /Users/lanerettig/wip/eth/evm2wasm/tools/wabt/bin/wat2wasm /Users/lanerettig/wip/eth/evm2wasm/tmp/manyFunctions100.wast -o /Users/lanerettig/wip/eth/evm2wasm/tmp/manyFunctions100.wasm

          at Test.assert [as _assert] (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:225:54)
          at Test.bound [as _assert] (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:77:32)
          at Test.fail (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:318:10)
          at Test.bound [as fail] (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:77:32)
          at runner.catch.err (/Users/lanerettig/wip/eth/evm2wasm/tests/runVmTests.js:171:9)
          at <anonymous>
  ...

Attempting to run this command manually produces:

~/wip/eth/evm2wasm master> /Users/lanerettig/wip/eth/evm2wasm/tools/wabt/bin/wat2wasm /Users/lanerettig/wip/eth/evm2wasm/tmp/manyFunctions100.wast -o /Users/lanerettig/wip/eth/evm2wasm/tmp/manyFunctions100.wasm
[1]    48249 segmentation fault  /Users/lanerettig/wip/eth/evm2wasm/tools/wabt/bin/wat2wasm  -o

lrettig avatar Apr 01 '18 15:04 lrettig

I tried this with the latest master version of wabt but it's still failing. The only lead I found is https://github.com/WebAssembly/wabt/issues/685 which suggests that certain characters can cause a segfault.

lrettig avatar Apr 01 '18 19:04 lrettig

does wabt crash if using wabt.js rather than the wabt binary? see also https://github.com/ewasm/evm2wasm/pull/174

cdetrio avatar Apr 02 '18 18:04 cdetrio

@cdetrio interestingly enough, this is what happens when I try to use wabt js (see https://github.com/lrettig/web-wabt-test):

RangeError: Maximum call stack size exceeded
    at pv (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:11:100915)
    at $b (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:5:292191)
    at sc (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:45889)
    at pc (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:13284)
    at Ec (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:56896)
    at uc (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:48024)
    at pc (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:13450)
    at Ec (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:56896)
    at uc (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:48024)
    at pc (/Users/lanerettig/wip/eth/web-wabt-test/node_modules/wabt/index.js:7:13450)

lrettig avatar Apr 23 '18 14:04 lrettig