From a7c0c01bf4812402cf025a651ab30b37782431e3 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 27 Oct 2021 19:42:01 +0200 Subject: [DYNAREC] Cancel a dynablock if a segfault occurs while building it --- src/libtools/signals.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libtools') diff --git a/src/libtools/signals.c b/src/libtools/signals.c index 1ac0dd4f..191267c4 100755 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -736,6 +736,8 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx) int Locks = unlockMutex(); uint32_t prot = getProtection((uintptr_t)addr); #ifdef DYNAREC + if((Locks & (1<<8)) && (sig==SIGSEGV)) //1<<8 is mutex_dyndump + cancelFillBlock(); // Segfault inside a Fillblock, just cancel it's creation, don't relock mutex dynablock_t* db = NULL; int db_searched = 0; if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_DYNAREC)) { -- cgit 1.4.1