about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-01-28 13:21:41 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-01-28 13:21:41 +0100
commit35a32481c61a3d70e44ea58ea0fb0f0fb30f0451 (patch)
tree57476d1d37cc9e89d947a3db140ff06e88da4905 /src
parentbeaf54301273f9310e082689c1b3a2239158cec8 (diff)
downloadbox64-35a32481c61a3d70e44ea58ea0fb0f0fb30f0451.tar.gz
box64-35a32481c61a3d70e44ea58ea0fb0f0fb30f0451.zip
[DYNAREC] Narrow the cases for Strange SIGSEGV to protextion with READ & WIRTE
Diffstat (limited to 'src')
-rw-r--r--src/libtools/signals.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index f39e1170..da51bcd4 100644
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -1449,7 +1449,7 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for
         printf_log(log_minimum, "%04d|Double %s (code=%d, pc=%p, addr=%p, prot=%02x)!\n", tid, signame, old_code, old_pc, old_addr, prot);
         exit(-1);
     } else {
-        if((sig==SIGSEGV) && (info->si_code == SEGV_ACCERR) && ((prot&~PROT_CUSTOM)==5 || (prot&~PROT_CUSTOM)==7)) {
+        if((sig==SIGSEGV) && (info->si_code == SEGV_ACCERR) && ((prot&~PROT_CUSTOM)==(PROT_READ|PROT_WRITE) || (prot&~PROT_CUSTOM)==(PROT_READ|PROT_WRITE|PROT_EXEC))) {
             static uintptr_t old_addr = 0;
         printf_log(/*LOG_DEBUG*/LOG_INFO, "%04d| Strange SIGSEGV with Access error on %p for %p%s, db=%p, prot=0x%x (old_addr=%p)\n", tid, pc, addr, mapped?" mapped":"", db, prot, (void*)old_addr);
             #ifdef DYNAREC