Jacek Caban : wow64: Preserve TEB exception frame in Wow64KiUserCallbackDispatcher.
Alexandre Julliard
julliard at winehq.org
Thu Aug 11 15:26:18 CDT 2022
Module: wine
Branch: master
Commit: 21a3690ad12bcf2088e0fe9ddef0fc824298690f
URL: https://gitlab.winehq.org/wine/wine/-/commit/21a3690ad12bcf2088e0fe9ddef0fc824298690f
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sat Jul 30 15:57:08 2022 +0200
wow64: Preserve TEB exception frame in Wow64KiUserCallbackDispatcher.
---
dlls/wow64/syscall.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c
index 73fb84c6d2e..8cb5f92c245 100644
--- a/dlls/wow64/syscall.c
+++ b/dlls/wow64/syscall.c
@@ -850,6 +850,8 @@ void WINAPI Wow64ApcRoutine( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3, CON
NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len,
void **ret_ptr, ULONG *ret_len )
{
+ TEB32 *teb32 = (TEB32 *)((char *)NtCurrentTeb() + NtCurrentTeb()->WowTebOffset);
+ ULONG teb_frame = teb32->Tib.ExceptionList;
struct user_callback_frame frame;
frame.prev_frame = NtCurrentTeb()->TlsSlots[WOW64_TLS_USERCALLBACKDATA];
@@ -916,6 +918,7 @@ NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len,
break;
}
+ teb32->Tib.ExceptionList = teb_frame;
NtCurrentTeb()->TlsSlots[WOW64_TLS_USERCALLBACKDATA] = frame.prev_frame;
NtCurrentTeb()->TlsSlots[WOW64_TLS_TEMPLIST] = frame.temp_list;
return frame.status;
More information about the wine-cvs
mailing list