Closed
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