fix(libkernel): fail reads on Windows directory descriptors #4917
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4917"
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 MarcZX10 on 2026-10-13T04:04:28Z.
What
Fixes #4912. Carries David's
d7ef271efcommit, preserving his original commit authorship. On Windows, reads from the directory descriptors AnyPS5 models withNULnow match the Linux/FreeBSD error behavior:read,readv,preadandpreadvreturnEISDIR;pwritereturnsEBADF. Regular file and pipe paths are unchanged.The focused regression checks also confirm that
getdentsstill works after the failed reads.Tested
Linux, GCC 12.2, Release,
BUILD_TESTING=ON:guest_filesystem: passed (1/1).tools/check_conventions.py --base upstream/main: passed.git diff --check upstream/main...HEAD: passed.Windows runtime validation is reported in issue #4912; I did not run that validation locally. No title run or full build was performed for this carry.
Checklist
main; no open PR implements this changeImported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T06:15:39Z.
Windows test: head
2f1eb100amerged onto currentmain2cc97e105(clean merge, no conflicts). Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: full build 0 errors; ctest with the filterguest_filesystem: guest_filesystem passed (1 test(s), 0 failed);python tools/check_conventions.py --base upstream/mainpassed. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T12:00:17Z.
Windows counter-test (follow-up to the earlier Windows run): Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, this PR merged onto
main2a2a3dc65.guest_filesystempasses with the PR; with the PR's source files replaced bymain's, same test, it aborts at line 686 (guest errno 13). The "without" run also prints that the Windows lstat link checks were skipped on this host (creating symbolic links needs Developer Mode or administrator rights), so the symlink-dependent checks did not run in either case.Not tested: Linux, a console, a title run.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T00:55:29Z.
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release,
-j4: head2f1eb100aof this PR merged ontomain0dea07ab2(clean merge, 3 files; the description reports Linux only).guest_filesystempasses (0.30 s, ctest).Open.cppandStdio.cpp(core/libs/prx/libkernel/File/src/) taken back tomainand the PR's new test lines kept,guest_filesystemfails (Filesystem check failed at line 725 (guest errno 13, Win32 error 0), exit code0xc0000409).AI-assisted (Claude Code).