Skip to content

WebAssembly: Unable to obtain funcref from pointer #53789

Closed
@nokotan

Description

In a WebAssembly assembly code, unable to obtain funcref from function pointer.

.global funcptr_to_funcref
.global __indirect_function_table
.table_type __indirect_function_table, funcref

funcptr_to_funcref:
  .functype funcptr_to_funcref (i32) -> (funcref)
  local.get 0
  table.get __indirect_function_table
  end_function
popped externref, expected funcref

Table type of __indirect_function_table is funcref, it is expected that table.get will push a corresponding funcref into the stack.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions