FEX
FEX copied to clipboard
Host deferred signals
This is an alternative way for us to avoid signal reentrancy amplification issues, vs blocking signals.
Split from #1666,
(a) Is easy to do by adding a "is signal pending" check before returns to the JIT (syscalls, compile code, other non-thunks). This can be easily done either in the dispatcher/jit side, or the C++ side. The only complication is automatically restarted system calls. It has near zero overhead, and doesn't suffer from execution 'overshot' of guest deferred signal, just delayed signal delivery. This will largely resolve signal safety issues.