WebAssembly / WebAssembly/binaryen

Validator incorrectly rejects call_indirect to table of type `(ref null nofunc)`

Open
#8,710 2 comments 0 reactions 1 assignee View on GitHub

@stevenfontanella is already working on this.

Since May 15, 2026.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

Module:

(module
  (type $nopType (func (param i32)))

  (table $t1 1 1 (ref null nofunc))

  (func $nop (export "nop") (type $nopType)
    (nop)
  )

  (func $calls-nop-via-ref
    (call_indirect $t1 (type $nopType) (i32.const 1) (i32.const 0))
  )
)
$ bin/wasm-opt -all test/lit/passes/global-effects-closed-world-ignore-implicit-traps.wast
[wasm-validator error in function calls-nop-via-ref] unexpected false: call-indirect table must be of function type., on
(call_indirect $t1 (type $nopType)
 (i32.const 1)
 (i32.const 0)
)
Fatal: error validating input

This module passes validation on the spec interpreter.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.