JIT: don't join worker threads twice (#4252)

in case of WASM_ENABLE_LAZY_JIT==0, compile_jit_functions should
have already joined these threads. joining them again here is
an undefined behavior.
This commit is contained in:
YAMAMOTO Takashi 2025-05-08 11:24:55 +09:00 committed by GitHub
parent ca5a2faf58
commit f88718d705
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -5711,6 +5711,7 @@ orcjit_thread_callback(void *arg)
static void
orcjit_stop_compile_threads(WASMModule *module)
{
#if WASM_ENABLE_LAZY_JIT != 0
uint32 i, thread_num = (uint32)(sizeof(module->orcjit_thread_args)
/ sizeof(OrcJitThreadArg));
@ -5719,6 +5720,7 @@ orcjit_stop_compile_threads(WASMModule *module)
if (module->orcjit_threads[i])
os_thread_join(module->orcjit_threads[i], NULL);
}
#endif
}
static bool

View File

@ -2493,6 +2493,7 @@ orcjit_thread_callback(void *arg)
static void
orcjit_stop_compile_threads(WASMModule *module)
{
#if WASM_ENABLE_LAZY_JIT != 0
uint32 i, thread_num = (uint32)(sizeof(module->orcjit_thread_args)
/ sizeof(OrcJitThreadArg));
@ -2501,6 +2502,7 @@ orcjit_stop_compile_threads(WASMModule *module)
if (module->orcjit_threads[i])
os_thread_join(module->orcjit_threads[i], NULL);
}
#endif
}
static bool