From dbf8bafc3ae66ebb6e356b3e8a7485848e12b5ef Mon Sep 17 00:00:00 2001 From: Daan Date: Tue, 2 Nov 2021 21:50:15 -0700 Subject: [PATCH] avoid accessing the thread_id after process initialized is set --- src/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.c b/src/init.c index ef44d273..cb9d123f 100644 --- a/src/init.c +++ b/src/init.c @@ -479,10 +479,10 @@ static void mi_detect_cpu_features(void) { void mi_process_init(void) mi_attr_noexcept { // ensure we are called once if (_mi_process_is_initialized) return; - mi_process_setup_auto_thread_done(); - _mi_verbose_message("process init: 0x%zx\n", _mi_thread_id()); _mi_process_is_initialized = true; + mi_process_setup_auto_thread_done(); + mi_detect_cpu_features(); _mi_os_init();