mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
FEX rebuilt the guest RIP of a signal frame from the host PC, but kept RIP entries only for instructions that might touch memory and none for a block's exit code. A signal inside a ret, call, push or pop exit reported the old RIP with RSP and the stack already updated, so a handler that reads or rewrites the return address (CoreCLR's GC return-address hijack) saw a torn frame. Patch 0013 records a RIP for every instruction, maps host PCs inside each block's exit code to the branch target, takes the block header from the entry sequence when a signal lands before the block stores it, treats dispatcher code that still holds the guest registers in host registers as JIT code, and never reads the block header for dispatcher PCs. Adds the signal-return-hijack probe, a test and a docs entry.