Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/iwasm/aot/aot_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ set_error_buf_v(char *error_buf, uint32 error_buf_size, const char *format, ...)
}
}

static void
aot_unlinked_import_func_trap(WASMExecEnv *exec_env)
{
AOTModuleInstance *module_inst = (AOTModuleInstance *)exec_env->module_inst;
aot_set_exception_with_id(module_inst, EXCE_CALL_UNLINKED_IMPORT_FUNC);
}

static void *
runtime_malloc(uint64 size, char *error_buf, uint32 error_buf_size)
{
Expand Down Expand Up @@ -1397,6 +1404,7 @@ init_func_ptrs(AOTModuleInstance *module_inst, AOTModule *module,
* Debugging: Check if the import is resolved at link time */
LOG_WARNING("warning: failed to link import function (%s, %s)",
module_name, field_name);
*func_ptrs = (void *)aot_unlinked_import_func_trap;
}
}

Expand Down
Loading