mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
A thread suspended inside a system call returns through sysret, which overwrites rcx and r11, so the delivery address passed in rcx was garbage when the redirected thread resumed. PPSA12544 crashed that way on its SaveDataProcessQueue thread, blocked in a host wait when Unity's GC raised SIGUSR1. The redirected rip is now an entry stub that takes the delivery from its fixed place above rsp. It also stores the live general registers into the delivery's context first: the snapshot taken while the thread was in the system call still holds the call number in rax instead of its result, which the restore would have handed back to the wait. The guest test raises at a thread blocked on a host mutex in 20 rounds and expects each delivery once the wait returns; it fails without this change. AI-assisted: yes Co-Authored-By: Claude Opus 5.5 <[email protected]>