Improve stack trace dump and fix coding guideline CI (#2599)

Avoid the stack traces getting mixed up together when multi-threading is enabled
by using exception_lock/unlock in dumping the call stacks.

And remove duplicated call stack dump in wasm_application.c.

Also update coding guideline CI to fix the clang-format-12 not found issue.
This commit is contained in:
Enrico Loparco
2023-09-29 04:52:54 +02:00
committed by GitHub
parent 3c17a36ccb
commit 00539620e9
8 changed files with 28 additions and 24 deletions

View File

@ -3945,7 +3945,6 @@ wasm_interp_call_wasm(WASMModuleInstance *module_inst, WASMExecEnv *exec_env,
/* This frame won't be used by JITed code, so only allocate interp
frame here. */
unsigned frame_size = wasm_interp_interp_frame_size(all_cell_num);
char exception[EXCEPTION_BUF_LEN];
if (argc < function->param_cell_num) {
char buf[128];
@ -4030,8 +4029,6 @@ wasm_interp_call_wasm(WASMModuleInstance *module_inst, WASMExecEnv *exec_env,
wasm_interp_dump_call_stack(exec_env, true, NULL, 0);
}
#endif
wasm_copy_exception(module_inst, exception);
LOG_DEBUG("meet an exception %s", exception);
}
wasm_exec_env_set_cur_frame(exec_env, prev_frame);