Skip to content

Commit 3e65a38

Browse files
committed
demo watch dog
1 parent cbb6d03 commit 3e65a38

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/iwasm/aot/aot_runtime.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ set_error_buf_v(char *error_buf, uint32 error_buf_size, const char *format, ...)
114114
}
115115
}
116116

117+
static void
118+
aot_unlinked_import_func_trap(void) {
119+
printf("Unlinked import function called, this should not happen!\n");
120+
}
121+
117122
static void *
118123
runtime_malloc(uint64 size, char *error_buf, uint32 error_buf_size)
119124
{
@@ -1387,6 +1392,7 @@ init_func_ptrs(AOTModuleInstance *module_inst, AOTModule *module,
13871392
const char *field_name = module->import_funcs[i].func_name;
13881393
LOG_WARNING("warning: failed to link import function (%s, %s)",
13891394
module_name, field_name);
1395+
*func_ptrs = (void*)aot_unlinked_import_func_trap;
13901396
}
13911397
}
13921398

0 commit comments

Comments
 (0)