wasm loader: Reject v128 for interpreters (#3611)
discussed in: https://github.com/bytecodealliance/wasm-micro-runtime/pull/3592
This commit is contained in:
@ -85,6 +85,21 @@ is_valid_value_type(uint8 type)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
is_valid_value_type_for_interpreter(uint8 value_type)
|
||||
{
|
||||
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
|
||||
/*
|
||||
* Note: regardless of WASM_ENABLE_SIMD, our interpreters don't have
|
||||
* SIMD implemented. It's safer to reject v128, especially for the
|
||||
* fast interpreter.
|
||||
*/
|
||||
if (value_type == VALUE_TYPE_V128)
|
||||
return false;
|
||||
#endif
|
||||
return is_valid_value_type(value_type);
|
||||
}
|
||||
|
||||
bool
|
||||
is_valid_func_type(const WASMFuncType *func_type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user