summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2018-10-30 12:46:31 -0700
committerGitHub <noreply@github.com>2018-10-30 12:46:31 -0700
commitbba180a8c1ea170341e8479ba6ceebeb7b97cf73 (patch)
tree72d00ba442aa5b5026914ed15457d101a117d11e /src/binary-reader-objdump.cc
parent38d6ac56fc9bead682f9c09295303635aeca47d8 (diff)
downloadwabt-bba180a8c1ea170341e8479ba6ceebeb7b97cf73.tar.gz
wabt-bba180a8c1ea170341e8479ba6ceebeb7b97cf73.tar.bz2
wabt-bba180a8c1ea170341e8479ba6ceebeb7b97cf73.zip
Check type use vs. explicit sig. in call_indirect (#937)
The `call_indirect` instruction can take a type use, but can also take an explicit signature: ``` call_indirect (type $foo) ;; type use call_indirect (param i32) ;; explicit signature call_indirect (type $bar) (result f32) ;; both ``` These type signatures must match, or the wat file is considered malformed. This was properly checked in the spec tests, because it was performed in a separate function `wabt::ValidateFuncSignatures`. This wasn't validated in `wat2wasm`, because it performs the full module validation via `wabt::ValidateModule`, which doesn't share code with `ValidateFuncSignatures`. It might be a good idea to share the code between these two, but for now it's enough to fix this bug by performing the same check in the module validation path. Fixes issue #936.
Diffstat (limited to 'src/binary-reader-objdump.cc')
0 files changed, 0 insertions, 0 deletions