mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 19:36:55 +02:00
a46dde89a2
Frame-pointer leaf functions address red-zone locals through RBP below RSP (e.g. [rbp-0x108] with rsp = rbp-0xc8). The patcher only modeled RSP-relative operands, so such functions were left unprotected and a handled access fault overwrote their locals (PPSA10595 crash in a decompressor on Background Worker #2). Track RBP - RSP through the CFG, translate frame-relative operands into the red-zone model, resolve mov rsp,rbp / lea rsp,[rbp+k] / leave deltas, and fall back to conservative protection when the offset is unknown. Also follow resolved jump-table successors in the liveness pass. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>