Fix wasm-c-api trap message format issue (#644)
And fix two compile warnings.
This commit is contained in:
@ -2300,7 +2300,7 @@ invoke_wasm_c_api_native(AOTModuleInstance *module_inst, void *func_ptr,
|
||||
}
|
||||
if (trap) {
|
||||
if (trap->message->data) {
|
||||
snprintf(fmt, sizeof(fmt), "%%%us", (uint32)trap->message->size);
|
||||
snprintf(fmt, sizeof(fmt), "%%.%us", (uint32)trap->message->size);
|
||||
snprintf(module_inst->cur_exception,
|
||||
sizeof(module_inst->cur_exception),
|
||||
fmt, trap->message->data);
|
||||
|
||||
@ -835,7 +835,7 @@ wasm_runtime_destroy_thread_env()
|
||||
{
|
||||
#if WASM_ENABLE_AOT != 0
|
||||
#ifdef OS_ENABLE_HW_BOUND_CHECK
|
||||
return aot_signal_destroy();
|
||||
aot_signal_destroy();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ os_thread_cleanup(void *retval)
|
||||
BH_FREE(thread_data);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
static unsigned __stdcall
|
||||
os_thread_wrapper(void *arg)
|
||||
{
|
||||
os_thread_data *thread_data = arg;
|
||||
|
||||
Reference in New Issue
Block a user