Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

illegal opcode when main does not match signature on create (binaryen) #442

Closed
lrettig opened this issue Oct 8, 2018 · 2 comments
Closed

Comments

@lrettig
Copy link
Member

lrettig commented Oct 8, 2018

Happens with both create opcode and create from tx. Sample init code wast:

        (module
          (import "ethereum" "finish" (func $finish (param i32 i32)))
          (memory 1)
          (export "memory" (memory 0))
          ;; signature does not match definition for $main
          (export "main" (func $main))

          (func $main (param i32)
            (call $finish
              (i32.const 0)
              (i32.const 0)
            )
          )
        )

error:

[2018-10-07 23:38:25.816431] [0x00007fffac722380] [info]    Loaded EVMC module: hera 0.1.0-dev+commit.a468d441 (/Users/lanerettig/eth/hera2/build/src/libhera.dylib)
Running tests using path: "/Users/lanerettig/eth/tests/"
Running 1 test case...
Test Case "stEWASMTests":
100%
Executing message in Hera
importGlobals
Function `$0` expects 1 parameters, got 0 arguments.
unknown location:0: fatal error: in "GeneralStateTests/stEWASMTests": signal: illegal opcode; address of failing instruction: 0x105225cd6
/Users/lanerettig/eth/cpp-ethereum/test/tools/libtesteth/TestHelper.cpp:595: last checkpoint

This happens only using binaryen; I see a different issue with wabt.

@lrettig lrettig changed the title illegal opcode when main does not match signature on create illegal opcode when main does not match signature on create (binaryen) Oct 8, 2018
@axic axic closed this as completed Oct 25, 2018
@axic
Copy link
Member

axic commented Oct 25, 2018

Can you check with master?

lrettig added a commit to lrettig/tests that referenced this issue Oct 25, 2018
@lrettig
Copy link
Member Author

lrettig commented Oct 25, 2018

All good now, see ewasm/tests#96

lrettig added a commit to lrettig/tests that referenced this issue Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants