Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ static void mi_process_init_once(void) {
// the following can potentially allocate (on freeBSD for pthread keys)
_mi_tls_slots_init(); // pthread key create
_mi_thread_locals_init(); // pthread key create
mi_process_setup_auto_thread_done(); // after the above mi_thread_init so it can add the current theap
_mi_process_is_initialized = true;
_mi_process_is_initialized = true; // before `mi_process_setup_auto_thread_done` so `_mi_theap_default` returns the current theap with `MI_TLS_RECURSE_GUARD`
mi_process_setup_auto_thread_done(); // after the above mi_thread_init so it can add the current theap

#if defined(_WIN32) && defined(MI_WIN_INIT_USE_FLS)
// On windows, when building as a static lib the FLS cleanup happens to early for the main thread.
Expand Down