about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndré Zwing <nerv@dawncrow.de>2025-05-12 18:15:53 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-05-12 22:33:22 +0200
commit915c4bf3b718e8612afae223d79efaf7c136a78f (patch)
treed8cad7343422387b1f2e09d2e876e7323f734a23
parent7a8a1a7791578177fc98e29c4f88864763f14f92 (diff)
downloadbox64-915c4bf3b718e8612afae223d79efaf7c136a78f.tar.gz
box64-915c4bf3b718e8612afae223d79efaf7c136a78f.zip
rbtree needs initialized mutexes
-rw-r--r--src/custommem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/custommem.c b/src/custommem.c
index 96511c58..f61fd978 100644
--- a/src/custommem.c
+++ b/src/custommem.c
@@ -2223,6 +2223,7 @@ void init_custommem_helper(box64context_t* ctx)
     inited = 1;
 
     cur_brk = dlsym(RTLD_NEXT, "__curbrk");
+    init_mutexes();
     blockstree = rbtree_init("blockstree");
     // if there is some blocks already
     if(n_blocks)
@@ -2230,7 +2231,6 @@ void init_custommem_helper(box64context_t* ctx)
             rb_set(blockstree, (uintptr_t)p_blocks[i].block, (uintptr_t)p_blocks[i].block+p_blocks[i].size, i);
     memprot = rbtree_init("memprot");
     sigfillset(&critical_prot);
-    init_mutexes();
 #ifdef DYNAREC
     if(BOX64ENV(dynarec)) {
         #ifdef JMPTABL_SHIFT4