Module: wine Branch: master Commit: 3e0c21bed182782dfced05b591b972806a2d1727 URL: https://gitlab.winehq.org/wine/wine/-/commit/3e0c21bed182782dfced05b591b9728...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Dec 19 11:57:40 2023 +0100
wow64: Initialize the syscall dispatcher in the 32-bit TEB.
---
dlls/wow64/syscall.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 2af7bf75de2..db51948057f 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -827,8 +827,10 @@ static DWORD WINAPI process_init( RTL_RUN_ONCE *once, void *param, void **contex */ static void thread_init(void) { + TEB32 *teb32 = (TEB32 *)((char *)NtCurrentTeb() + NtCurrentTeb()->WowTebOffset); void *cpu_area_ctx;
+ teb32->WOW32Reserved = PtrToUlong( pBTCpuGetBopCode() ); RtlWow64GetCurrentCpuArea( NULL, &cpu_area_ctx, NULL ); NtCurrentTeb()->TlsSlots[WOW64_TLS_WOW64INFO] = wow64info; if (pBTCpuThreadInit) pBTCpuThreadInit();