[PATCH 3/3] ntdll: Take ControlPcIsUnwound into account on arm64 too
Martin Storsjö
wine at gitlab.winehq.org
Tue Jun 7 06:21:16 CDT 2022
From: Martin Storsjö <martin at martin.st>
This is the same modification as the previous patch, applied on arm64.
It doesn't change the outcome for any of my tests though.
Signed-off-by: Martin Storsjö <martin at martin.st>
---
dlls/ntdll/signal_arm64.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index 034c78f6b4d..fba0da48a16 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -165,6 +165,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
{
LDR_DATA_TABLE_ENTRY *module;
NTSTATUS status;
+ DWORD64 pc;
dispatch->ImageBase = 0;
dispatch->ScopeIndex = 0;
@@ -175,14 +176,14 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
* signal frame.
*/
dispatch->ControlPcIsUnwound = (context->ContextFlags & CONTEXT_UNWOUND_TO_CALL) != 0;
+ pc = context->Pc - (dispatch->ControlPcIsUnwound ? 4 : 0);
/* first look for PE exception information */
- if ((dispatch->FunctionEntry = lookup_function_info(
- context->Pc - (dispatch->ControlPcIsUnwound ? 4 : 0),
+ if ((dispatch->FunctionEntry = lookup_function_info(pc,
&dispatch->ImageBase, &module )))
{
- dispatch->LanguageHandler = RtlVirtualUnwind( type, dispatch->ImageBase, context->Pc,
+ dispatch->LanguageHandler = RtlVirtualUnwind( type, dispatch->ImageBase, pc,
dispatch->FunctionEntry, context,
&dispatch->HandlerData, &dispatch->EstablisherFrame,
NULL );
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/198
More information about the wine-devel
mailing list