From 9da41caad3610d54f4c26e29508ccaff9feba887 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 5 Mar 2025 11:48:41 +0100 Subject: [PATCH] Revert "mimalloc: use "weak" random seed when statically linked" In preparation for upgrading to a newer mimalloc version; This patch will not be needed anymore, as it has been implemented in a slightly different form in upstream mimalloc: 3e1d800e (potential fix for windows static linking with thread creation in dll's, 2022-11-07). Signed-off-by: Johannes Schindelin --- compat/mimalloc/init.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/compat/mimalloc/init.c b/compat/mimalloc/init.c index 4ec5812e3c..4670d5510d 100644 --- a/compat/mimalloc/init.c +++ b/compat/mimalloc/init.c @@ -302,11 +302,7 @@ static bool _mi_heap_init(void) { _mi_memcpy_aligned(tld, &tld_empty, sizeof(*tld)); _mi_memcpy_aligned(heap, &_mi_heap_empty, sizeof(*heap)); heap->thread_id = _mi_thread_id(); - #if defined(_WIN32) && !defined(MI_SHARED_LIB) - _mi_random_init_weak(&heap->random); // match mi_heap_main_init() - #else _mi_random_init(&heap->random); - #endif heap->cookie = _mi_heap_random_next(heap) | 1; heap->keys[0] = _mi_heap_random_next(heap); heap->keys[1] = _mi_heap_random_next(heap);