diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-10-03 17:37:12 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-10-03 17:37:12 +0200 |
| commit | b1c10d5ccd9dfea899a86a02627f0ea1a215ff5b (patch) | |
| tree | 0198a01bc15a6f93856e7d67200c84a0e7852663 /src/libtools/signals.c | |
| parent | 7bf2caa5c4ef9662b9da66f3f895ed538692946e (diff) | |
| download | box64-b1c10d5ccd9dfea899a86a02627f0ea1a215ff5b.tar.gz box64-b1c10d5ccd9dfea899a86a02627f0ea1a215ff5b.zip | |
[DYNAREC] Small fix on SIGILL handling
Diffstat (limited to 'src/libtools/signals.c')
| -rw-r--r-- | src/libtools/signals.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index e59bcdf6..ad7d085f 100644 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -882,8 +882,6 @@ void my_sigactionhandler_oldcode_64(x64emu_t* emu, int32_t sig, int simple, sigi (void)ucntx; (void)cur_db; void* pc = NULL; #endif - // setup libc context stack frame, on caller stack - frame = frame&~15; // stack tracking x64_stack_t *new_ss = my_context->onstack[sig]?(x64_stack_t*)pthread_getspecific(sigstack_key):NULL; @@ -897,6 +895,7 @@ void my_sigactionhandler_oldcode_64(x64emu_t* emu, int32_t sig, int simple, sigi new_ss->ss_flags = SS_ONSTACK; } } else { + frame = frame&~15; frame -= 0x200; // redzone } @@ -1069,6 +1068,7 @@ void my_sigactionhandler_oldcode_64(x64emu_t* emu, int32_t sig, int simple, sigi } else if(sig==X64_SIGILL) { info2->si_code = 2; sigcontext->uc_mcontext.gregs[X64_TRAPNO] = 6; + info2->si_addr = (void*)sigcontext->uc_mcontext.gregs[X64_RIP]; } else if(sig==X64_SIGTRAP) { if(info->si_code==1) { //single step info2->si_code = 2; |