mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-02 12:56:05 +00:00
A leaf's body ran from its start to the next known start or int3 padding, so a function reached only through a pointer, placed right after the leaf without int3 padding, was framed as part of the leaf: its rsp operands were moved and its exits raised rsp although nothing had lowered it. The body now also ends at 16-byte-aligned code after a ret or ud2, and at the target of a jmp when only padding lies between them (a tail call to the next function). Code past such a point is framed only from a real start. A leaf whose code continues past it is skipped as branching out of the function. Aligned code after any other jmp stays in the body: loop headers are aligned there, and cutting after every jmp skipped 2,129 of 2,131 framed leaves in PPSA01556. With this cut 2,132 are framed, and none of them has rewritten bytes in another function of the unwind table.