From 09e39704ae85c84622e55ed0eb7efb6cd2214401 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 24 Jun 2025 20:17:58 +0200 Subject: [DYNAREC] Better check of limit for a dynablock --- src/dynarec/dynarec_native_pass.c | 2 +- src/tools/env.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c index f7d02f13..5fdcc11b 100644 --- a/src/dynarec/dynarec_native_pass.c +++ b/src/dynarec/dynarec_native_pass.c @@ -256,7 +256,7 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int } #else // check if block need to be stopped, because it's a 00 00 opcode (unreadeable is already checked earlier) - if((ok>0) && !dyn->forward && !(*(uint32_t*)addr)) { + if((ok>0) && !dyn->forward && (!(getProtection(addr)&PROT_READ) || !(*(uint32_t*)addr))) { if (dyn->need_dump) dynarec_log(LOG_NONE, "Stopping block at %p reason: %s\n", (void*)addr, "Next opcode is 00 00 00 00"); ok = 0; need_epilog = 1; diff --git a/src/tools/env.c b/src/tools/env.c index 3d3ad25b..4ce600c9 100644 --- a/src/tools/env.c +++ b/src/tools/env.c @@ -815,7 +815,7 @@ done: #else #error meh! #endif -#define DYNAREC_VERSION SET_VERSION(0, 0, 1) +#define DYNAREC_VERSION SET_VERSION(0, 0, 2) typedef struct DynaCacheHeader_s { char sign[10]; //"DynaCache\0" -- cgit 1.4.1