getlogin_r and readdir_r are absent (VLC, PS5MC); fix branch ready #3556
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 screamm on 2026-10-11T13:09:10Z.
getlogin_r(libkernel, NID78FiHequa9U) andreaddir_r(libc, NIDJ0kng1yac3M) are absent. From the relink registry order they are the predicted next stops of VLC (PPSA85300;getlogin_rcalled from libsmb2smb2_init_contextat 0x5356B5 with a 1024-byte buffer and a"Guest"fallback;readdir_rfrom libbluray_dir_read_posixat 0x16A0B91 with a 264-byte stackdirent), and PS5MC (PPSA99420) importsgetlogin_r; not yet observed in a run.Fix branch ready:
screamm:feat/libc-getlogin-readdir-r(two commits onmaina11c8f7f:dc750864feat(libkernel): implement getlogin_r,01085afefeat(libc): implement readdir_r). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commits as they are.getlogin_r(name, len)next togetuidinSystem/src/Process.cpp: a length below 1 returnsERANGEwithout touching the buffer (FreeBSD 11.4getlogin.c,8c639945); every other call throws without writing a name, because no public source (shadPS4, KytyPS5, SharpProspero, fpPS4) gives the login name a console game process gets; recorded in TechnicalDebt. VLC therefore loads past the import and only reaches the throw when opening an SMB share.readdir_r(dir, entry, result)inlibc/src/Directory.cppafter FreeBSDreaddir.c__readdir_r: reads under the existing per-stream mutex through a helper shared withreaddir(one position per stream), copiesrecordLengthbytes (FreeBSD's_GENERIC_DIRSIZ), sets*resultor NULL at end, returns 0 or the read errno; null streamEBADF; null entry/result throw.guest_credentialsandguest_directorygain theERANGE/throw cases and a full walk compared withreaddir, the copy length, errno kept at end, continuing after areaddir, and the error cases.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs: both tests 3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"533/536, the failures being the knownwindows_exceptions(#3411),guest_kernel_sys(#3510) andguest_filesystem(#3518); withmain'sDirectory.cppthe extended directory test fails;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T14:01:58Z.
Independent verification on Linux (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.main— no rebase needed, the commit (01085afe1) is unchanged.tools/check_conventions.py --base origin/mainandgit diff --checkpass.The branch is also mirrored at
blawesom:verify/3556for anyone carrying.Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T14:22:03Z.
Run evidence for both predictions (Windows 11, WinLibs GCC 15.2.0, catalog build with
eboot.binandsce_module/libc.prxunwrapped):maina11c8f7f, VLC (PPSA85300) stops on the first one:getlogin_rexport added, the next stop is the second:So both are observed stops now, in that order. I'm not carrying the branch.
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T14:29:41Z.
Thanks, that settles both: the issue now has observed stops in the predicted order (VLC on
78FiHequa9U, thenJ0kng1yac3Moncegetlogin_rexists), so the branch covers exactly VLC's next two stops onmaina11c8f7f.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T14:29:47Z.
I split the two missing exports across focused PRs so each has one implementation to review:
getlogin_rreaddir_rreaddir, copies the guest record, and returns the entry or EOF result.For #3635, the focused Linux
guest_directorytest passed, including the new null-result-pointer case; conventions andgit diff --checkpassed. I did not run VLC or a Windows build. The issue remains open while these PRs are reviewed.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:08:13Z.
Closing: both are on main,
getlogin_rwith #3606 andreaddir_rwith #3635.