fix(libc): map a Windows symbolic link loop to ELOOP when opening #8640
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8640"
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 Dom3005 on 2026-10-20T19:41:56Z.
What
On Windows,
CreateFileWfails a symbolic link that resolves to itself withERROR_CANT_RESOLVE_FILENAME(1921).WindowsOpenError_nid_no_patchhad no case for it and returnedEINVAL, sosceKernelOpenreturned0x80020016andopenandfopenset errno 22 where FreeBSD reportsELOOP(62). This adds the mapping.sceKernelStatalready reportsELOOPfor the same link (#6992, #8149).This is the
sceKernelOpen("loop")row of #6983. Theloop/insideand 300-character name rows are not changed.Tested
Windows 11 10.0.26200 (NTFS, Developer Mode on), WinLibs GCC 15.2.0 r7 UCRT, Release,
BUILD_TESTING=ON.guest_filesystem: new checks forsceKernelOpen,openandfopenon the existingstat-looplink. Without the fix it fails at thesceKernelOpencheck (guest errno 22, Win32 error 1921); with the fix it passes.ctest -R 'file|path|stream|open|stat|dir|fopen|libc|errno|symlink|link': 124/124 passed.python tools/check_conventions.py: passed.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
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T20:15:49Z.
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.
core/libs/prx/libc/src/General.cppcore/libs/tests/GuestFilesystem.cppcore/libs/prx/libc/src/General.cppcore/libs/prx/libc/src/General.cppcore/libs/prx/libc/src/General.cppcore/libs/tests/GuestFilesystem.cppcore/libs/tests/GuestFilesystem.cpp