mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-28 22:00:50 +01:00
This is required for backtrace to work correctly. If we are using our custom instruction for returning from a signal, then backtrace tries to read PC for the sigreturn code and finds our code, breaking it. Instead we now /correctly/ support using rt_sigreturn/sigreturn and the restorer provided from the user. To facilitate this, we now store a single 64-bit value on the stack to return our host stack pointer to the correct location from before the signal. With cookie checking in place, we can know if an application betrays our expectations and tries to pass its own signal frames. If an application in the future /does/ try to pass its own signal frames, that's unsafe and we cna deal with it then.