[PATCH 0/1] MR3315: ntdll: Fix NtContinue from within exception context on ARM64
When handling an exception, NtContinue can be called from within the signal handler, in which case the raise(SIGUSR2) call ends up getting eaten and integer register context gets restored. Switch to the method used on X86 to avoid these issues. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3315
From: Billy Laws <blaws05(a)gmail.com> When handling an exception, NtContinue can be called from within the signal handler, in which case the raise(SIGUSR2) call ends up getting eaten and integer register context never ends up getting restored. Switch to the method used on X86 to avoid these issues. --- dlls/ntdll/unix/signal_arm64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index f553aac1993..7f998f894d4 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -569,7 +569,8 @@ NTSTATUS signal_set_full_context( CONTEXT *context ) { NTSTATUS status = NtSetContextThread( GetCurrentThread(), context ); - if (!status && (context->ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER) raise( SIGUSR2 ); + if (!status && (context->ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER) + arm64_thread_data()->syscall_frame->restore_flags |= CONTEXT_INTEGER; return status; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3315
participants (2)
-
Billy Laws -
Billy Laws (@bylaws)