emscripten-core / emscripten-core/emscripten

Wasm validator error

Open
#22,090 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I recently upgraded emsdk to latest and I am given a wasm validator error, before upgrading the build worked as expected and didn't have any errors, but now after updating and attempting to rebuild, I'm getting the following error

```
[wasm-validator error in function 581] call param types must match, on
(call $fimport$0
(i32.add
(local.get $7)
(i32.const 8)
)
(local.get $5)
(select
(i32.const 0)
(select
(i32.const 1)
(i32.const 2)
(i32.and
(local.tee $2
(i32.load offset=4
(local.get $0)
)
)
(i32.const 4)
)
)
(i32.and
(local.get $2)
(i32.const 2)
)
)
)
(on argument 1)
[wasm-validator error in function 581] call param types must match, on
(call $fimport$0
(i32.add
(local.get $7)
(i32.const 8)
)
(local.get $5)
(select
(i32.const 0)
(select
(i32.const 1)
(i32.const 2)
(i32.and
(local.tee $2
(i32.load offset=4
(local.get $0)
)
)
(i32.const 4)
)
)
(i32.and
(local.get $2)
(i32.const 2)
)
)
)
(on argument 2)
Fatal: error validating input
emcc: error: '/root/emsdk/upstream/bin/wasm-opt --strip-target-features --post-emscripten -O3 --low-memory-unused --zero-filled-memory --pass-arg=directize-initial-contents-immutable /tmp/emscripten_temp_49nmu78j/libcapstone.wasm -o /tmp/emscripten_temp_49nmu78j/libcapstone.wasm --mvp-features --enable-multivalue --enable-mutable-globals --enable-sign-ext' failed (returned 1)
make: *** [Makefile:10: build] Error 1
```

NOTES:
- this issue is similar to #6116
- this is using the most recent update as of this post
- the repo this is occuring with is https://github.com/n0thhhing/ts-capstone with the build file being in build/scripts/build.sh

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.