mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 17:13:13 -05:00
#9272 keeps liveStacks and protectedStackPages alive through static destruction so that a late mprotect from an atexit handler can still look up guest thread stacks. The mutex guarding them is still a static std::mutex. libstdc++'s std::mutex has a trivial destructor, so it keeps working on Linux, but libc++ destroys the pthread mutex, and a later lock throws "mutex lock failed: Invalid argument": on macOS the exit probe of guest_memory_lifetime fails at its mapping protection stage. The lock is now allocated and never destroyed, like the maps. The same change is part of #7201 and #8658. Co-Authored-By: marion909 <103169397+marion909@users.noreply.github.com> Co-Authored-By: iamthehimansh <67262056+iamthehimansh@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>