Skip to content
Snippets Groups Projects
Commit 324150c0 authored by Martin Storsjö's avatar Martin Storsjö Committed by Alexandre Julliard
Browse files

ntdll: Fix arm call_user_exception_dispatcher with kernel stack for syscalls.


This does the same as 23b44e8d,
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: default avatarMartin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent aa256dee
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment