AnyPS5/core/libs/prx/libkernel/Pthread
Claude a60256ea4d
fix(kernel): exit POSIX guest threads without forced unwinding
On Linux scePthreadExit called pthread_exit, whose forced unwind runs
the personality routine of every guest frame. Those resolve to
libc.prx's __gxx_personality_v0, which cannot read libgcc's unwind
context and aborts, so guest_thread_self crashed on Linux.

Record a jump target in the thread start routine and longjmp back to it
from scePthreadExit instead. Like _endthreadex on Windows, this skips
the guest frames without unwinding them; the start routine still
releases the thread normally. Threads not created by scePthreadCreate
keep the pthread_exit fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018emyZ4Rk8yoSJvxTFBe4DL
2026-09-28 07:47:12 +00:00
..
Posix fix(libkernel): drop the scePthreadOnce stub that shadowed the implementation 2026-09-27 11:26:58 -07:00
include Merge upstream main into fix/audit-2026-09 2026-09-28 07:34:25 +00:00
src fix(kernel): exit POSIX guest threads without forced unwinding 2026-09-28 07:47:12 +00:00