mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-07 12:16:24 +00:00
[bugfix] initialize "module->retain_function" for wasm_mini_loader (#1333)
Before resolving the module function's export in wasm_mini_loader, "module->retain_function" need to be initialized, otherwise, the "__new" function export will lead to abort. issue: https://github.com/bytecodealliance/wasm-micro-runtime/issues/1332 Co-authored-by: yaozhongxiao <yaozhongxiao@bytedance.com>
This commit is contained in:
parent
ab752cd5c3
commit
efc8bc10a9
|
@ -1988,6 +1988,7 @@ load_from_sections(WASMModule *module, WASMSection *sections,
|
|||
|
||||
module->malloc_function = (uint32)-1;
|
||||
module->free_function = (uint32)-1;
|
||||
module->retain_function = (uint32)-1;
|
||||
|
||||
/* Resolve malloc/free function exported by wasm module */
|
||||
export = module->exports;
|
||||
|
|
Loading…
Reference in New Issue
Block a user