mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-07 12:16:24 +00:00
don't return an uninitialized trap if argv_to_results fails (#3935)
Currently, if argv_to_results fails (e.g. because an unsupported type is encountered), an non-null trap with an uninitialized message is returned.
This commit is contained in:
parent
e09613c722
commit
838dd81e68
|
@ -3442,6 +3442,8 @@ wasm_func_call(const wasm_func_t *func, const wasm_val_vec_t *params,
|
|||
if (result_count) {
|
||||
if (!argv_to_results(argv, wasm_functype_results(func->type),
|
||||
results)) {
|
||||
wasm_runtime_set_exception(func->inst_comm_rt,
|
||||
"argv_to_results failed");
|
||||
goto failed;
|
||||
}
|
||||
results->num_elems = result_count;
|
||||
|
|
Loading…
Reference in New Issue
Block a user