Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle global.get in element segments #660

Open
gtrepta opened this issue Jun 26, 2024 · 0 comments
Open

Handle global.get in element segments #660

gtrepta opened this issue Jun 26, 2024 · 0 comments

Comments

@gtrepta
Copy link
Contributor

gtrepta commented Jun 26, 2024

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))
  )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant