Stream: git-wasmtime

Topic: wasmtime / issue #11563 Failure to instantiate a table-wi...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 22:56):

alexcrichton opened issue #11563:

This input:

(module
  (import "" "" (global exnref))
  (table 1 exnref (global.get 0))
)

is valid:

$ wasm-tools validate testcase0.wat

but cannot be instantiated:

$ cargo run -- -Wexceptions,function-references -W unknown-imports-default testcase0.wasm
Error: failed to run main module `testcase0.wasm`

Caused by:
    0: failed to instantiate "testcase0.wasm"
    1: type mismatch: value does not match table element type
    2: type mismatch: expected (ref null exn), found (ref null none)

Possibly related to https://github.com/bytecodealliance/wasmtime/issues/11561, but also feels like it may be distinct? Unsure.

cc @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 22:56):

alexcrichton added the fuzz-bug label to Issue #11563.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 22:56):

alexcrichton added the wasm-proposal:exceptions label to Issue #11563.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 23:14):

cfallin commented on issue #11563:

This appears to be fixed by #11564 as well (though the wast runner seems not to support unknown-imports-default and my clumsy attempts at writing a component-based test with two modules are currently failing)

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 23:27):

alexcrichton commented on issue #11563:

Perhaps this? (untested, on the wrong computer now)

(module $m
  (global (export "") exnref (ref.null exn))
)
(module
  (import "m" "" (global exnref))
  (table 1 exnref (global.get 0))
)

view this post on Zulip Wasmtime GitHub notifications bot (Aug 29 2025 at 03:21):

alexcrichton closed issue #11563:

This input:

(module
  (import "" "" (global exnref))
  (table 1 exnref (global.get 0))
)

is valid:

$ wasm-tools validate testcase0.wat

but cannot be instantiated:

$ cargo run -- -Wexceptions,function-references -W unknown-imports-default testcase0.wasm
Error: failed to run main module `testcase0.wasm`

Caused by:
    0: failed to instantiate "testcase0.wasm"
    1: type mismatch: value does not match table element type
    2: type mismatch: expected (ref null exn), found (ref null none)

Possibly related to https://github.com/bytecodealliance/wasmtime/issues/11561, but also feels like it may be distinct? Unsure.

cc @cfallin


Last updated: Dec 06 2025 at 07:03 UTC