Skip to content

Handle global.get in element segments #660

Open
@gtrepta

Description

@gtrepta

WebAssembly/spec@c2b3446 introduces a change to the conformance tests, which makes the interpreter fail on this function evaluation:

#t2aElemExpr < ctx (... localIds: .Map , globalIds: .Map , funcIds: #freshId ( 0 ) |-> 0 , typeIds: $out-i32 |-> 0 , tableIds: .Map , elemIds: .Map , memoryIds: .Map ) > ( ( item global.get 0  .EmptyStmts ) )

The source that causes this:

(module $module4
  (func (result i32)
    i32.const 42
  )
  (global (export "f") funcref (ref.func 0))
)

(register "module4" $module4)

(module
  (import "module4" "f" (global funcref))
  (type $out-i32 (func (result i32)))
  (table 10 funcref)
  (elem (offset (i32.const 0)) funcref (global.get 0))
  (func (export "call_imported_elem") (type $out-i32)
    (call_indirect (type $out-i32) (i32.const 0))
  )
)

Metadata

Metadata

Assignees

No one assigned

    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