about summary refs log tree commit diff stats
path: root/src/libtools
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-02-26 09:38:01 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-02-26 09:38:01 +0100
commitb65e02420f5ef1da5a6bb34b4d3020f4e38d6f91 (patch)
tree6ef58cb78624911b03186e6681836464c4f5a7bc /src/libtools
parent5a7761c294f2ac0b703027bede709025e90b13e2 (diff)
downloadbox64-b65e02420f5ef1da5a6bb34b4d3020f4e38d6f91.tar.gz
box64-b65e02420f5ef1da5a6bb34b4d3020f4e38d6f91.zip
Made the Signal workaround specific to RK3588
Diffstat (limited to 'src/libtools')
-rwxr-xr-xsrc/libtools/signals.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index 98062054..cb237f7e 100755
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -853,11 +853,14 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
         CancelBlock64(0);
         cancelFillBlock();  // Segfault inside a Fillblock, cancel it's creation...
     }
+    #ifdef RK3588
     // try to see if the si_code makes sense
+    // the RK3588 tend to need a special Kernel that seems to have a weird behaviour sometimes
     if((sig==SIGSEGV) && (addr) && (info->si_code == 1) && prot&(PROT_READ|PROT_WRITE|PROT_EXEC)) {
         printf_log(LOG_DEBUG, "Workaround for suspicious si_code for %p / prot=0x%x\n", addr, prot);
         info->si_code = 2;
     }
+    #endif
     dynablock_t* db = NULL;
     int db_searched = 0;
     if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_DYNAREC)) {