From f41cc02c6c019cb2600281830ffaf559f1fad001 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Fri, 4 Feb 2022 13:15:07 -0600 Subject: [PATCH] disable overwrite host's stack data --- src/core/kernel/support/EmuFS.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/kernel/support/EmuFS.cpp b/src/core/kernel/support/EmuFS.cpp index 651fd1a39..259e488e3 100644 --- a/src/core/kernel/support/EmuFS.cpp +++ b/src/core/kernel/support/EmuFS.cpp @@ -650,8 +650,13 @@ void EmuGenerateFS(Xbe::TLS *pTLS, void *pTLSData) // Write the Xbox stack base to the Host, allows ConvertThreadToFiber to work correctly // Test case: DOA3 - __writefsdword(TIB_StackBase, (DWORD)NewPcr->NtTib.StackBase); - __writefsdword(TIB_StackLimit, (DWORD)NewPcr->NtTib.StackLimit); + // NOTE: This is disabled due to cause of corruption to host's TIB and + // silent crash for xbox threads creation. + // Test case: + // * Direct3DCreate9Ex call from inside xbox thread + // * PCSTProxy (used from PsCreateSystemThreadEx export function) + //__writefsdword(TIB_StackBase, (DWORD)NewPcr->NtTib.StackBase); + //__writefsdword(TIB_StackLimit, (DWORD)NewPcr->NtTib.StackLimit); } // Set flat address of this PCR