This does the same as 23b44e8df62847872d036cd88d72e36b5424ee35, but for arm:
Don't call KiUserExceptionDispatcher directly on the stack pointer stored in the CONTEXT, but use the one stored in syscall_frame (which includes the stack allocation in e.g. RtlRaiseException).
Signed-off-by: Martin Storsjö martin@martin.st --- dlls/ntdll/unix/signal_arm.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 798d7b9cc87..88718e938a8 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -563,12 +563,16 @@ void call_raise_user_exception_dispatcher(void) NTSTATUS call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEXT *context ) { struct syscall_frame *frame = arm_thread_data()->syscall_frame; + DWORD lr = frame->lr; + DWORD sp = frame->sp; NTSTATUS status = NtSetContextThread( GetCurrentThread(), context );
if (status) return status; frame->r0 = (DWORD)rec; frame->r1 = (DWORD)context; frame->pc = (DWORD)pKiUserExceptionDispatcher; + frame->lr = lr; + frame->sp = sp; frame->restore_flags |= CONTEXT_INTEGER | CONTEXT_CONTROL; return status; }