From 7c36b51aafce8b83dd4fb547723902b8b8976158 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 12 Mar 2012 11:11:36 +0100 Subject: [PATCH] ntdll: Restore the original context for the last frame instead of the result of the unwind handler. --- dlls/ntdll/signal_x86_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 144dad17600..a9ff371b126 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -2927,7 +2927,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec dispatch.ContextRecord = context; dispatch.HistoryTable = table; - while (dispatch.EstablisherFrame != (ULONG64)end_frame) + for (;;) { /* FIXME: should use the history table to make things faster */ @@ -3031,6 +3031,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec dispatch.EstablisherFrame = new_context.Rsp; } + if (dispatch.EstablisherFrame == (ULONG64)end_frame) break; *context = new_context; }