Implement multi-module feature and bulk-memory feature (#271)

Refine wasm loader and aot loader
Fix potential issue of os_mmap/os_munmap
Update document
This commit is contained in:
wenyongh
2020-06-02 14:53:06 +08:00
committed by GitHub
parent e81f72d41f
commit 752826a667
57 changed files with 4902 additions and 818 deletions

View File

@ -445,7 +445,7 @@ wasm_app_routine(void *arg)
0, NULL)) {
const char *exception = wasm_runtime_get_exception(inst);
bh_assert(exception);
printf("Got exception running wasi start function: %s\n",
app_manager_printf("Got exception running wasi start function: %s\n",
exception);
wasm_runtime_clear_exception(inst);
goto fail1;
@ -467,7 +467,7 @@ wasm_app_routine(void *arg)
0, NULL)) {
const char *exception = wasm_runtime_get_exception(inst);
bh_assert(exception);
printf("Got exception running WASM code: %s\n",
app_manager_printf("Got exception running WASM code: %s\n",
exception);
wasm_runtime_clear_exception(inst);
/* call on_destroy() in case some resources are opened in on_init()
@ -644,7 +644,7 @@ wasm_app_module_install(request_t * msg)
if (!module) {
SEND_ERR_RESPONSE(msg->mid,
"Install WASM app failed: load WASM file failed.");
printf("error: %s\n", err);
app_manager_printf("error: %s\n", err);
destroy_all_aot_sections(aot_file->sections);
return false;
}
@ -674,7 +674,7 @@ wasm_app_module_install(request_t * msg)
if (!inst) {
SEND_ERR_RESPONSE(msg->mid,
"Install WASM app failed: instantiate wasm runtime failed.");
printf("error: %s\n", err);
app_manager_printf("error: %s\n", err);
wasm_runtime_unload(module);
destroy_all_aot_sections(aot_file->sections);
return false;
@ -713,7 +713,7 @@ wasm_app_module_install(request_t * msg)
if (!module) {
SEND_ERR_RESPONSE(msg->mid,
"Install WASM app failed: load WASM file failed.");
printf("error: %s\n", err);
app_manager_printf("error: %s\n", err);
destroy_all_wasm_sections(bytecode_file->sections);
return false;
}
@ -744,7 +744,7 @@ wasm_app_module_install(request_t * msg)
if (!inst) {
SEND_ERR_RESPONSE(msg->mid,
"Install WASM app failed: instantiate wasm runtime failed.");
printf("error: %s\n", err);
app_manager_printf("error: %s\n", err);
wasm_runtime_unload(module);
destroy_all_wasm_sections(bytecode_file->sections);
return false;