bytecodealliance / bytecodealliance/wasmtime

Display expected/actual type signature in "indirect call type mismatch" error?

Open
#3,705 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

#### Feature

Currently, when a `call_indirect` opcode is executed with mismatching types, `wasmtime` would display something like:

```
Error: failed to run main module `closure.wasm`

Caused by:
0: failed to invoke command default
1: wasm trap: indirect call type mismatch
wasm backtrace:
0: 0x40515a - !__main_void
1: 0x4051af - !__original_main
2: 0x405197 - !_start
3: 0x4078c8 - !_start.command_export
```

It would be nice to have enriched error message that displays the expected/actual type signatures here, this will help debugging a lot.

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.