diff options
Diffstat (limited to 'src/libtools')
| -rwxr-xr-x | src/libtools/signals.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index 2d3a8aed..3cb84d7d 100755 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -705,6 +705,8 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void relockMutex(Locks); } +extern __thread void* current_helper; + void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx) { // sig==SIGSEGV || sig==SIGBUS || sig==SIGILL here! @@ -736,8 +738,10 @@ 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 + if((Locks & (1<<8)) && (sig==SIGSEGV) && current_helper) {//1<<8 is mutex_dyndump + relockMutex(Locks); + cancelFillBlock(); // Segfault inside a Fillblock, cancel it's creation... + } dynablock_t* db = NULL; int db_searched = 0; if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_DYNAREC)) { |