From c81b9630b0b619f27cda6b599bbb6777a9a0bb73 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Thu, 25 Jun 2026 15:45:22 +0800 Subject: [PATCH] [DYNAREC] Always initialize jump table for DynaRec build If DynaRec is disabled by env var but enabled in rcfile, the initialize process will be: ``` LoadEnvVariables() NewBox64Context() -> dynarec=0, jump table not initialize ApplyEnvFileEntry() AllocLoadElfMemory() -> crash ``` I guess it's okay to always initilize the table. --- src/custommem.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/custommem.c b/src/custommem.c index 638167b542..7c6f78474b 100644 --- a/src/custommem.c +++ b/src/custommem.c @@ -3155,29 +3155,27 @@ 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"); #ifdef DYNAREC - if(BOX64ENV(dynarec)) { - #ifdef JMPTABL_SHIFT4 - for(int i=0; i<(1<