You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iwasm fails to validate the type of the table used in the call_indirect instruction. According to the WebAssembly specification, the table associated with call_indirect must have a funcref type.
iwasm --interp -f main ./program.wasm
iwasm --fast-jit -f main ./program.wasm
iwasm --llvm-jit -f main ./program.wasm
iwasm --multi-tier-jit -f main./program.wasm
Actual behavior
The iwasm proceeds to execute the module without raising any validation error, despite the table having an invalid type (externref) for use in the call_indirect instruction. The observed output in all execution modes is:
0x12342468:i32
Expected behavior
The WebAssembly specification mandates that the table used in the call_indirect instruction must be of type funcref. Tables of type externref cannot hold function references and are invalid for call_indirect. The runtime should fail validation and report an error similar to:
Validation error: call_indirect is only valid when a table has type funcref
The text was updated successfully, but these errors were encountered:
Subject of the issue
iwasm fails to validate the type of the table used in the
call_indirect
instruction. According to the WebAssembly specification, the table associated withcall_indirect
must have afuncref
type.Test case
Your environment
Actual behavior
The iwasm proceeds to execute the module without raising any validation error, despite the table having an invalid type (externref) for use in the call_indirect instruction. The observed output in all execution modes is:
Expected behavior
The WebAssembly specification mandates that the table used in the call_indirect instruction must be of type funcref. Tables of type externref cannot hold function references and are invalid for call_indirect. The runtime should fail validation and report an error similar to:
The text was updated successfully, but these errors were encountered: