diff options
Diffstat (limited to 'src/libtools')
| -rwxr-xr-x | src/libtools/signals.c | 4 | ||||
| -rwxr-xr-x | src/libtools/threads.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index eb533b0d..d6014c19 100755 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -700,8 +700,8 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx) void * pc = NULL; // unknow arch... #warning Unhandled architecture #endif -#ifdef DYNAREC uint32_t prot = getProtection((uintptr_t)addr); +#ifdef DYNAREC dynablock_t* db = NULL; int db_searched = 0; if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_DYNAREC)) { @@ -834,6 +834,8 @@ exit(-1); else printf_log(log_minimum, "\n"); } + if(sig==SIGSEGV && info->si_code==2 && ((prot&~PROT_CUSTOM)==5 || (prot&~PROT_CUSTOM)==7)) + return; // that's probably just a multi-task glitch, like seen in terraria if(my_context->signals[sig] && my_context->signals[sig]!=1) { if(my_context->is_sigaction[sig]) my_sigactionhandler_oldcode(sig, info, ucntx, &old_code, db); diff --git a/src/libtools/threads.c b/src/libtools/threads.c index ed37ca2c..567fb76f 100755 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -306,7 +306,7 @@ EXPORT int my_pthread_create(x64emu_t *emu, void* t, void* attr, void* start_rou et->fnc = (uintptr_t)start_routine; et->arg = arg; #ifdef DYNAREC - if(box64_dynarec) { + if(0 && box64_dynarec) { // disable for now // pre-creation of the JIT code for the entry point of the thread dynablock_t *current = NULL; DBGetBlock(emu, (uintptr_t)start_routine, 1, ¤t); |