mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
A stack base need not be page aligned (it is not on Linux), so rounding the range down first could leave the stack and miss the stack path. The range the guest asked for is now checked against the guest stack, and the rounded pages are protected, as FreeBSD rounds the address down. A thread that exits with part of its stack protected left those pages to the next thread that reused the stack. Protected stack pages are recorded, and a thread's stack is made readable and writable again when it is unregistered at exit. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>