Skip to content

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

@stevenfontanella

Description

@stevenfontanella

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions