Module: wine Branch: master Commit: 5a68254c131290adbf51843aa82f543afe99fe87 URL: https://source.winehq.org/git/wine.git/?a=commit;h=5a68254c131290adbf51843aa...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jul 15 10:23:52 2020 +0200
ntdll: Handle faults inside the signal handler also on ARM.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/signal_arm.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 1fadb0aa07..4ec311de44 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -567,23 +567,8 @@ extern void WINAPI call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEX */ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) { - NTSTATUS status; - - switch(rec->ExceptionCode) - { - case EXCEPTION_ACCESS_VIOLATION: - if (rec->NumberParameters == 2) - { - if (!(rec->ExceptionCode = virtual_handle_fault( (void *)rec->ExceptionInformation[1], - rec->ExceptionInformation[0], FALSE ))) - goto done; - } - break; - } - status = NtRaiseException( rec, context, TRUE ); + NTSTATUS status = NtRaiseException( rec, context, TRUE ); if (status) RtlRaiseStatus( status ); -done: - set_cpu_context( context ); }
@@ -624,6 +609,9 @@ static void segv_handler( int signal, siginfo_t *info, void *ucontext ) rec->NumberParameters = 2; rec->ExceptionInformation[0] = (get_error_code(context) & 0x800) != 0; rec->ExceptionInformation[1] = (ULONG_PTR)info->si_addr; + if (!(rec->ExceptionCode = virtual_handle_fault( (void *)rec->ExceptionInformation[1], + rec->ExceptionInformation[0], FALSE ))) + return; break; case TRAP_ARM_ALIGNFLT: /* Alignment check exception */ rec->ExceptionCode = EXCEPTION_DATATYPE_MISALIGNMENT;