From b65e02420f5ef1da5a6bb34b4d3020f4e38d6f91 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 26 Feb 2023 09:38:01 +0100 Subject: Made the Signal workaround specific to RK3588 --- src/libtools/signals.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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)) { -- cgit 1.4.1