ntdll-RtlUnwind: Update patchset and fix a second bug in the unwinding code.

Fixes https://bugs.wine-staging.com/show_bug.cgi?id=68.
This commit is contained in:
Sebastian Lackner 2015-02-10 00:10:32 +01:00
parent d329354032
commit c1ae413bcc
3 changed files with 24 additions and 9 deletions

1
debian/changelog vendored
View File

@ -1,5 +1,6 @@
wine-staging (1.7.37) UNRELEASED; urgency=low
* Fix a TRACE line in the iphlpapi-TCP_Table patchset.
* Update patchset for RtlUnwindEx on x86_64 and fix a second bug.
* Removed patches for UTF7 support (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 08 Feb 2015 20:29:38 +0100

View File

@ -1,18 +1,32 @@
From 7dd7631b611976b237acc63386b26866e5b4b253 Mon Sep 17 00:00:00 2001
From 3c89d2a189c2cc869c7ce81293ab752e3fa57708 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 25 Jan 2015 15:46:05 +0100
Subject: ntdll: Fix check for end_frame in RtlUnwindEx on x86_64.
Subject: ntdll: Fix check for end_frame in RtlUnwindEx on x86_64. (rev 2)
Changes in v2:
* Calling wine internal handlers should not mess up the EstablisherFrame.
---
dlls/ntdll/signal_x86_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dlls/ntdll/signal_x86_64.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 05581c2..e739cdb 100644
index 05581c2..7072569 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -3178,7 +3178,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
dispatch.EstablisherFrame = new_context.Rsp;
@@ -3167,6 +3167,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
}
else /* hack: call builtin handlers registered in the tib list */
{
+ DWORD64 backup_frame = dispatch.EstablisherFrame;
while ((ULONG64)teb_frame < new_context.Rsp && (ULONG64)teb_frame < (ULONG64)end_frame)
{
TRACE( "found builtin frame %p handler %p\n", teb_frame, teb_frame->Handler );
@@ -3175,10 +3176,10 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
teb_frame = __wine_pop_frame( teb_frame );
}
if ((ULONG64)teb_frame == (ULONG64)end_frame && (ULONG64)end_frame < new_context.Rsp) break;
- dispatch.EstablisherFrame = new_context.Rsp;
+ dispatch.EstablisherFrame = backup_frame;
}
- if (context->Rsp == (ULONG64)end_frame) break;
@ -21,5 +35,5 @@ index 05581c2..e739cdb 100644
}
--
2.2.1
2.2.2

View File

@ -2207,7 +2207,7 @@ fi
if test "$enable_ntdll_RtlUnwindEx" -eq 1; then
patch_apply ntdll-RtlUnwindEx/0001-ntdll-Fix-check-for-end_frame-in-RtlUnwindEx-on-x86_.patch
(
echo '+ { "Sebastian Lackner", "ntdll: Fix check for end_frame in RtlUnwindEx on x86_64.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Fix check for end_frame in RtlUnwindEx on x86_64.", 2 },';
) >> "$patchlist"
fi