Skip to content

Commit

Permalink
Set thread information earlier in exec_env creation
Browse files Browse the repository at this point in the history
  • Loading branch information
sjamesr committed Dec 19, 2024
1 parent 9563909 commit 019e902
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/iwasm/common/wasm_exec_env.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ wasm_exec_env_create_internal(struct WASMModuleInstanceCommon *module_inst,
#endif

#ifdef OS_ENABLE_HW_BOUND_CHECK
if (!os_thread_signal_inited()) {
goto fail5;
}

/* Set thread handle and stack boundary if they haven't been set */
wasm_exec_env_set_thread_info(exec_env);
wasm_runtime_set_exec_env_tls(exec_env);

if (!(exec_env->exce_check_guard_page =
os_mmap(NULL, os_getpagesize(), MMAP_PROT_NONE, MMAP_MAP_NONE,
os_get_invalid_handle())))
Expand Down

0 comments on commit 019e902

Please sign in to comment.