Fix app heap corrupted unchecked issue (#788)
Check whether app heap is corrupted in gc_migrate() and gci_dump(), and handle the failures in wasm/aot_enlarge_memory().
This commit is contained in:
@ -4211,3 +4211,14 @@ fail:
|
||||
wasm_runtime_free(results);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
wasm_runtime_show_app_heap_corrupted_prompt()
|
||||
{
|
||||
LOG_ERROR("Error: app heap is corrupted, if the wasm file "
|
||||
"is compiled by wasi-sdk-12.0 or higher version, "
|
||||
"please add -Wl,--export=malloc -Wl,--export=free "
|
||||
"to export malloc and free functions. If it is "
|
||||
"compiled by asc, please add --exportRuntime to "
|
||||
"export the runtime helpers.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user