fix(libkernel): join the calling thread and create from an unset attribute as the console does #4160
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4160"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-12T00:13:41Z.
What
scePthreadJointhrew when a thread joined itself, andscePthreadCreatethrew on a zeroed attribute. I called the console's exports from a homebrew payload on a PS5 (firmware 13.60):mainscePthreadJoinon the calling thread (a created thread, and the payload's main thread)EDEADLK(0x8002000B)scePthreadCreatewith a zeroed attributescePthreadJoinon a thread created detached, or afterscePthreadDetachEINVALEINVALscePthreadDetachtwiceEINVALEINVALscePthreadJoina second timeESRCH(0x80020003)The first two now behave as on the console, and
pthread_joinon the calling thread returns 11 (EDEADLK). The second join is not changed here: a joined thread is released at once, and keeping it for the second answer needs the thread lifetime to change. A null entry crashed the payload and still throws. A new TechnicalDebt entry records both.Titles: Hollow Knight: Silksong (PPSA12544), Hades (PPSA03355) and Propagation: Paradise Hotel (PPSA15878) create and join their threads through these calls. None of them is known to join itself or pass a zeroed attribute; this replaces two host exceptions with the console's answers.
Tested
guest_pthread_join_selfjoins a thread with itself through both APIs and creates one from a zeroed attribute; it aborts onmain.guest_pthread_join_selfpasses.agc_write_trackingandguest_kernel_stack_protectfail the same way on currentmainin this VM.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code