diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-10-27 19:42:01 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-10-27 19:42:01 +0200 |
| commit | a7c0c01bf4812402cf025a651ab30b37782431e3 (patch) | |
| tree | 19a4838571af31a48d188ba8ab6cf9cd6a3c0fc8 /src/libtools | |
| parent | d80226ec618917cfe41857a5fd24fcc7faf0c18b (diff) | |
| download | box64-a7c0c01bf4812402cf025a651ab30b37782431e3.tar.gz box64-a7c0c01bf4812402cf025a651ab30b37782431e3.zip | |
[DYNAREC] Cancel a dynablock if a segfault occurs while building it
Diffstat (limited to 'src/libtools')
| -rwxr-xr-x | src/libtools/signals.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)) { |