mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00: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 <[email protected]> Co-Authored-By: iamthehimansh <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>