From 77f34a05f5140720e2850d4104d6b1a79ffd45cb Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Tue, 17 Nov 2026 09:33:49 +0300 Subject: [PATCH] A plugin build whose plugins all stay off gives the game its own QueryMemory back (#845) plugins_start returned before clearing mem_query_hook and rt_process_memory when no plugin's set was on (the mod off, removed, or its file changed), so the game ran with the service run's view of memory: host ranges Inaccessible, the rtld stand-in below main. Co-Authored-By: Claude Opus 5.5 --- runtime/plugin_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/plugin_init.c b/runtime/plugin_init.c index ffbfcd3a..20204f66 100644 --- a/runtime/plugin_init.c +++ b/runtime/plugin_init.c @@ -636,7 +636,11 @@ int plugins_start(Cpu *c, const RtLoaded *sdk) { } run[i] = 1, nrun++; } - if (!nrun) return 0; + if (!nrun) { // every plugin's mod off or gone: the game sees its address space as without plugins + mem_query_hook = NULL; + rt_process_memory = NULL; + return 0; + } uint64_t t0 = plat_now_ms(); rt_log("boot: ENTER %s DT_INIT first: a mod plugin's init runs before the game's constructors", sdk->name); rt_call(c, sdk->init, 0);