fix(macos): increase guest fiber stack size (#154)

This commit is contained in:
Michael G authored and GitHub committed 2026-09-05 15:45:29 +02:00
1 parent 009697fb97
commit a67069afd3
1 file changed
+6 -2
+6 -2
View File
@@ -256,8 +256,12 @@ bool GuestFiberManager::CreateGuestFiber(uint32_t guestThreadAddr, uint32_t entr
gf.cpuContext.srr0 = entryPoint; gf.cpuContext.srr0 = entryPoint;
// The host stack models only translated host calls; the guest stack starts // The host stack models only translated host calls; the guest stack starts
// at stackBase in the CPU context above. // at stackBase in the CPU context above. 64 KiB is too small for deep
constexpr size_t kHostStackSize = 64 * 1024; // translated/HLE call chains (notably NW4R's sound worker), and on macOS
// it can exhaust the guarded coroutine stack as unrelated host work (such
// as a window resize) adds a little more nesting. Keep enough headroom for
// those chains while the guest stack remains separately bounded.
constexpr size_t kHostStackSize = 1024 * 1024;
gf.fiber = HostContext::Create(kHostStackSize, FiberProc, gf.fiber = HostContext::Create(kHostStackSize, FiberProc,
reinterpret_cast<void*>(static_cast<uintptr_t>(guestThreadAddr))); reinterpret_cast<void*>(static_cast<uintptr_t>(guestThreadAddr)));