Repository navigation
fix(libkernel): reject overlong POSIX thread names - #2230
Merged
adriadam10 merged 3 commits intoOct 10, 2026
Merged
Conversation
9 tasks done
Collaborator
|
This conflicts with main after today's merges; could you rebase? It passed testing and is otherwise ready. |
AI-assisted: yes. Validated with the final library change on Windows; full build and eight focused runtime tests pass. Expected rename behavior comes from the public firmware 13.60 probe in PR boykopovar#1798.
AI-assisted: yes. Match the firmware 13.60 probe in PR boykopovar#1798: names of 32 bytes or more return guest ENAMETOOLONG=63 and preserve the prior name. The complete final change passed a full Windows build and eight focused runtime tests.
AI-assisted: yes. Final code passed the complete Windows build, eight focused runtime tests and four deliberate-fault checks.
Collaborator
|
Rebased onto current main as @oneandonlydean asked (only conflict: adjacent test registrations in |
adriadam10
force-pushed
the
fix/libkernel-pthread-rename-limit
branch
from
October 10, 2026 07:56
7fe81d3 to
b8f04c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rejects
pthread_rename_npnames of 32 bytes or more with guestENAMETOOLONG(63), before changing the stored or native thread name. Names up to 31 bytes continue to succeed.This matches the published PS5 firmware 13.60 probe and raw output: 31 bytes succeed; 32 and 40 bytes return 63 and preserve the previous 31-byte name. That measurement was made by the author of #1798, not locally for this PR. This fixes an existing export; no title-unblocking or new-export claim is made.
The dedicated test avoids changing
GuestThreadSelf.cpp. Local merges with the inspected heads of #1798, #1739, #1676 and #2184 are clean. Actual library diffs of 522 open PR heads were inspected; no competing rename-length implementation was found. The latest additional PRs were checked before publication.Tested
Windows 11, WinLibs MinGW-w64 GCC 15.2.0 UCRT/POSIX/SEH, Ninja Release,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=ON; based on maind70b89989473ba1f6ae13e44e079e67f1f8a44b0.guest_pthread_rename,guest_thread_self,guest_pthread_attr,guest_kernel_errors,guest_errors,guest_thread_atexit,host_thread_localandguest_thread_callback_abi.guest_pthread_renamechecks empty, 1-, 11- and 31-byte names, rejects 32-, 40- and 1024-byte names, verifies the old name survives rejection, checks that a later valid rename succeeds, and checks output guards and errno preservation. It runs on both the adopted main thread and a created guest thread. Final runtime: 0.02 s.32-byte name returned 0; expected ENAMETOOLONG=63). It also detects three deliberate faults: rejecting 31 bytes, returning EINVAL, and changing the name before reporting the error. The final source was restored and rebuilt afterward.Linux, a new console run, games and the full CTest suite have not been run. No new dependency, silent stub or code comment is added.
AI-assisted: yes — OpenAI Codex assisted with implementation, testing and this description.
Checklist