mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
ntdll-NtContinue: Also use NtContinue() to continue after an exception on x86_64.
Patch by David Torok. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47970
This commit is contained in:
parent
6c44e84e74
commit
471dc198a8
@ -1,4 +1,4 @@
|
||||
From 1bcb3f9cab95745b01de529ae9b861c667be1394 Mon Sep 17 00:00:00 2001
|
||||
From d2dd24b9d13e1115822022b55e5f48cd5744ead3 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Wesie <awesie@gmail.com>
|
||||
Date: Fri, 27 Jul 2018 01:26:56 -0500
|
||||
Subject: [PATCH] ntdll: Use NtContinue to continue execution after exceptions.
|
||||
@ -14,9 +14,10 @@ unlikely that it has the correct behavior if called by an external caller.
|
||||
The __syscall_NtContinue wrapper is used so that it can be hooked by a
|
||||
third-party.
|
||||
---
|
||||
dlls/ntdll/exception.c | 5 +++--
|
||||
dlls/ntdll/signal_i386.c | 3 ++-
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
dlls/ntdll/exception.c | 5 +++--
|
||||
dlls/ntdll/signal_i386.c | 3 ++-
|
||||
dlls/ntdll/signal_x86_64.c | 3 ++-
|
||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
|
||||
index 3b85f1efa0..bc972254f1 100644
|
||||
@ -55,6 +56,27 @@ index e551646301..8fc885ed49 100644
|
||||
}
|
||||
|
||||
|
||||
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
|
||||
index e48529d73a..bf0ae2a98b 100644
|
||||
--- a/dlls/ntdll/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/signal_x86_64.c
|
||||
@@ -2520,6 +2520,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_contex
|
||||
return STATUS_UNHANDLED_EXCEPTION;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI __syscall_NtContinue( CONTEXT *context, BOOLEAN alert );
|
||||
|
||||
static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance )
|
||||
{
|
||||
@@ -2582,7 +2583,7 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL f
|
||||
}
|
||||
|
||||
done:
|
||||
- return NtSetContextThread( GetCurrentThread(), context );
|
||||
+ return __syscall_NtContinue( GetCurrentThread(), context );
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user