diff --git a/core/iwasm/aot/aot_runtime.c b/core/iwasm/aot/aot_runtime.c index b97e952832..c769a527e1 100644 --- a/core/iwasm/aot/aot_runtime.c +++ b/core/iwasm/aot/aot_runtime.c @@ -1774,7 +1774,7 @@ aot_module_malloc(AOTModuleInstance *module_inst, uint32 size, aot_set_exception(module_inst, "app heap corrupted"); } else { - aot_set_exception(module_inst, "out of memory"); + LOG_WARNING("warning: allocate %u bytes memory failed", size); } return 0; } diff --git a/core/iwasm/common/wasm_shared_memory.c b/core/iwasm/common/wasm_shared_memory.c index 65c98d4ef3..6fc9bf2073 100644 --- a/core/iwasm/common/wasm_shared_memory.c +++ b/core/iwasm/common/wasm_shared_memory.c @@ -224,7 +224,8 @@ acquire_wait_info(void *address, bool create) AtomicWaitInfo *wait_info = NULL; bh_list_status ret; - wait_info = (AtomicWaitInfo *)bh_hash_map_find(wait_map, address); + if (address) + wait_info = (AtomicWaitInfo *)bh_hash_map_find(wait_map, address); if (!create) return wait_info; diff --git a/core/iwasm/interpreter/wasm_runtime.c b/core/iwasm/interpreter/wasm_runtime.c index 14a4286490..76b4184b17 100644 --- a/core/iwasm/interpreter/wasm_runtime.c +++ b/core/iwasm/interpreter/wasm_runtime.c @@ -1830,7 +1830,7 @@ wasm_module_malloc(WASMModuleInstance *module_inst, uint32 size, wasm_set_exception(module_inst, "app heap corrupted"); } else { - wasm_set_exception(module_inst, "out of memory"); + LOG_WARNING("warning: allocate %u bytes memory failed", size); } return 0; }