Commit ad2f6e2b authored by yjh's avatar yjh Committed by Bastian Köcher
Browse files

wasm_executor: fix wasm signature checker (#471)


Signed-off-by: default avataryjhmelody <465402634@qq.com>
parent 87255ace
Pipeline #53683 passed with stages
in 19 minutes and 33 seconds
......@@ -143,7 +143,7 @@ impl ModuleImportResolver for Resolver {
let (params, ret_ty): (&[ValueType], Option<ValueType>) =
(&[ValueType::I32, ValueType::I32, ValueType::I32], None);
if signature.params() != params && signature.return_type() != ret_ty {
if signature.params() != params || signature.return_type() != ret_ty {
Err(WasmError::Instantiation(
format!("Export {} has a bad signature", field_name)
))
......@@ -159,7 +159,7 @@ impl ModuleImportResolver for Resolver {
let (params, ret_ty): (&[ValueType], Option<ValueType>) =
(&[ValueType::I32, ValueType::I32], None);
if signature.params() != params && signature.return_type() != ret_ty {
if signature.params() != params || signature.return_type() != ret_ty {
Err(WasmError::Instantiation(
format!("Export {} has a bad signature", field_name)
))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment