mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
pthread_once and scePthreadOnce removed their reset handler with a pop that runs whatever handler is on top of the cleanup stack. An initializer that pushed a handler of its own and then threw left that handler on top, so the pop ran it with dangling state. Both now record the stack top before pushing the reset handler; on a throw they restore the stack to it and reset the control directly, and a normal return restores it as well. Reported in review by Hussein Kadhim, who fixed it the same way. Co-authored-by: Hussein Kadhim <husseinkad.dev@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>