mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-27 13:00:47 +01:00
When executing a non-inlined syscall, we spill all static registers. We weren't storing in to the thread context that we have done this. If a signal occured between FEX returning from the syscall (after the blr) and before the `FillStaticRegs` then the signal handler would get the incorrect register state. This typically manifested as Steam getting a SIGCHLD, trying to recover the guest stack pointer, and it that pointer would be zero or some other corrupt value. Thus crashing inside of the signal handler. Surprising that we hadn't hit this way more before this point, must have needed hardware that tickled the race condition *just* right.