libkernel: Windows sceKernelGetdirentries stores 0 in *basep on every read, so guest_directory_entries cannot run on Windows #8590
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 xXPBSXx on 2026-10-20T17:40:56Z.
What
On Windows
sceKernelGetdirentries(core/libs/prx/libkernel/File/src/Stdio.cpp) writes0into*basepbefore every read. FreeBSD'skern_getdirentriesstores the directory offset the read started at (*basep = loff,sys/kern/vfs_syscalls.c, FreeBSD 11.4), so a guest that loops on the cookie sees it advance.core/libs/tests/GuestDirectoryEntries.cpp:81(base >= 0 && base != previousBase) aborts on Windows at the second read; the test is registered only for non-Windows hosts (if(NOT WIN32)incore/libs/prx/libkernel/CMakeLists.txt), so the gap was never visible in CI.Repro
Windows 10 (10.0.19045), WinLibs GCC 15.2.0 Release: enable
guest_directory_entries(WindowsPATH+configure_windows_unwindlikeguest_directory_rewind), buildguest_directory_entry_tests,ctest -R ^guest_directory_entries$:Directory entry check failed at line 81, exit 0xc0000409 (3 of 3 runs).Fix branch: https://github.com/xXPBSXx/AnyPS5/tree/fix/getdirentries-basep-windows
AI-assisted (Claude Code).