Repository navigation
fix(libc): report the empty host name measured on a PS5 - #10128
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
The gist records successful gethostname calls with both 256-byte and 1-byte buffers, an empty string, and unchanged errno, matching the implementation. The code retains the existing null query and short-buffer behavior; the zero-length case is not claimed as a console measurement. GCC 12.2 syntax checks for the implementation and test passed, as did exact-worktree conventions, diff-check, and main-sync (3 ahead/29 behind; merge clean). The author reports the Windows hostname regression passing three times. The #8279 debt-file overlap concerns a separate interfaces entry, and #6044 is currently dirty against main with its broader test-file moves; neither implements this hostname behavior. Hosted checks pass and product jobs are skipped by the workflow.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@orezraey Please keep the final checklist value to yes, removing the parenthetical suffix. |
|
The AI-assisted line now reads yes. |
|
Tested head
AI-assisted: yes (Claude Code); results above were run on this machine. |
What
gethostnamereturned the fixed nameAnyPS5. I measured it on a retail PS5 (firmware 13.60) with a homebrew probe, from a payload process. The source and console log are in this gist (pmisc).gethostname(buffer, 256)errnounchanged, the buffer holds an empty stringgethostname(buffer, 1)buffer[0]is 0It now reports the same empty name. Copying, the null queries and
ENAMETOOLONGfor a zero-length buffer still follow FreeBSD'sgethostname. The debt entry records the measurement and says that a title process, or a console with a configured name, may read another name.sysctlkern.hostnamestill answersAnyPS5here; my other change onSystemConfiguration.cppanswers the measured empty string there too.Tested
Windows 11, MinGW (winlibs).
guest_hostnamenow expects the empty name for every buffer length. It fails onmainand passes three runs in a row with the change.tools/check_conventions.pypasses.tools/pr_overlap.pylists fix(libs): build getifaddrs and two tests on macOS hosts #8279 (other lines of the debt file, macOS build of the tests) and test: organize library tests and label CTest suites #6044 (moves test files); neither changesgethostname.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)