fix(libkernel): report getdirentries basep position #5253
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5253"
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-13T15:40:49Z.
What
Carry Hussein Kadhim's
getdirentriesbasepfix onto currentmain, preserving his commit author. Windows now reports the directory entry index at the start of a successful read and leavesbasepunchanged on failure. The Linux path likewise writesbaseponly after a successful read. Add a Linux regression assertion that a too-small-buffer error leaves the caller'sbasepuntouched.Closes #5237.
Tested
guest_directory_entry_tests;guest_directory_entriespassed (1/1).guest_directoryandguest_fdopendirpassed (2/2).mainand passes with this change.python3 tools/check_conventions.py --base upstream/mainpassed.guest_directory_buffer,guest_directoryandguest_fdopendirchecks. I could not rerun the Windows target here: MinGW configuration stops becauselibgcc_s_seh-1.dllis unavailable.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)libkernel.mddebt entry; the runtime fix is independent)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T15:50:21Z.
Commit history is now split by authorship: Hussein Kadhim’s original
getdirentriesfix remains its own commit, and my added Linux failure-path regression is a separate MarcZX100-authored test commit. Linux validation recorded in the PR remains unchanged; the latest conventions check is running.Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-13T21:36:48Z.
On Windows this no longer builds once merged onto current
main(cf5f5b53b), although Git merges it without conflicts (Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7; AI-assisted: Claude Code):d31e28308(fix(libkernel): throw for unsupported directory entry names) removed the then-unusedgetdents_nid_postfix,getdirentries_nid_postfixand__error_nid_postfixdeclarations fromGuestDirectoryBuffer.cpp, andCheckBasehere still callsgetdirentries_nid_postfix. The test is registered only on Windows, so a Linux build does not compile it. A rebase that restoresint APS5_VABI getdirentries_nid_postfix(int, char*, int, std::int64_t*);in theextern "C"block fixes it.With that line restored, and #4999 also applied:
guest_directory_bufferpasses 20/20 and the fullctestpasses. With this PR and #4999,guest_directory_entries(Linux-only today) also passes on Windows.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:30:49Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Pull request closed