docs(libc): correct stale rmdir, nanf and bad_optional_access debt statements #9364
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9364"
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 thuanquang on 2026-10-21T19:21:02Z.
What
Three statements in
docs/dev/debt/libc.mdno longer matchmain; each is replaced with whatmaindoes now, and nothing else in the entries changes.rmdir("dir/."),unlink("dir/.")and the same calls with..follow the same lookup rule in FreeBSD but are not changed here: the guest still resolves the dot component away and acts ondiror its parent". All four calls are changed onmainnow. PR #3436 (8c06d20f6a, merged asea31cff19c) madermdir("dir/.")fail withEINVALbefore PR #8174 wrote this sentence, and #8797 (a2a77714d5, merged asa6fc8a467d) madesceKernelUnlinkandsceKernelRmdircallRenameDotError_nid_no_patch, the checkrenameuses (core/libs/prx/libkernel/File/src/Open.cpp:439 and Stdio.cpp:1525).unlinkandrmdirgo through them (Stdio.cpp:1075-1077 and 1544-1546). core/libs/tests/GuestFilesystem.cpp:274-282 checksunlink,rmdir,sceKernelUnlinkandsceKernelRmdirondir/.,dir/..and both with a trailing slash (errno 22, 0x80020016), andunlinkof.below a regular file (errno 20). Now: "unlink,rmdir,sceKernelUnlinkandsceKernelRmdirfollow the same rule".nanfis exported and returns the quiet NaN0x7fc00000(core/libs/prx/libc/src/Math.cpp:664-667;nanis at :668-671; the test is core/libs/tests/GuestMath.cpp:1471-1478). PR #3315 added both (31906bf9b0, merged as3fb2e29d75). The clause was written in that same commit, so it described main before the export. The commit message says VLC halted at nanf on Linux once strsep was available. That shows VLC imports nanf (NIDDZU+K1wozGI), but it does not show when VLC calls it. Now: "VLC (PPSA85300) imports nanf"._ZSt26_Throw_bad_optional_accessv(KwzEip7m6TM) fromlibc, and fail to load on main with unresolved import (0xC0000139)". libc exports_ZSt26_Throw_bad_optional_accessvwith no preprocessor guard (core/libs/prx/libc/src/exception/StandardExceptions.cpp:506; the type record and vtable are at :361-362). Its NID, computed with the tools/nid_names.py algorithm, isKwzEip7m6TM, so the import resolves. core/libs/tests/GuestBadOptionalAccess.cpp:34 and core/libs/tests/ExceptionRuntime.cpp:259 test it. PR #7872 added the export (2165427879ande775e456d8, merged as1e774a3b22) and wrote this clause about main before its own merge. Neither title was run. Now: "PPSA26578 (issue #7624) and PPSA34015 import_ZSt26_Throw_bad_optional_accessv(KwzEip7m6TM) fromlibc".Tested
Docs only; nothing was built or run. On origin/main
1698d1ea6aI read the following code, checked each sentence's history with git log -S, and recomputed the NIDs KwzEip7m6TM and DZU+K1wozGI with the tools/nid_names.py algorithm: unlink, sceKernelRmdir and rmdir (core/libs/prx/libkernel/File/src/Stdio.cpp:1054-1057 and 1463-1485), sceKernelUnlink (Open.cpp:423-436), the guest path resolver loop and FinalPathComponentIsDot_nid_no_patch (core/libs/prx/libc/src/General.cpp:351-363 and 717-723), the dot-directory test (core/libs/tests/GuestFilesystem.cpp:1304-1314), nanf and nan (core/libs/prx/libc/src/Math.cpp:595-602, a file with no preprocessor guards) with their test (GuestMath.cpp:1325-1332), and the bad_optional_access exports (StandardExceptions.cpp:341-348 and 486, built through src/exception/Exports.cpp from libc CMakeLists.txt:103) with their tests. (main1896871ba7). Rebased ontomain11d6efa06cfor the conflict with #9777 (merged; its atanf entry now sits above this one) indocs/dev/debt/libc.md. #8797 (merged 2026-10-22) had made the rename part stale, so that sentence now says whatmaindoes (see What); every location in What was rechecked on11d6efa06c. Each statement was found by a read-only sweep of the debt files and confirmed by two independent verifier passes and a final check on currentmain. No open pull request edits these sentences (checked against every open PR's diff of this file).python tools/check_conventions.py --base origin/mainwith this title and body: 0 errors; the rename, sceKernelRename entry goes from 1074 characters to 943, under thedebt-lengthlimit.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)🤖 Generated with Claude Code