libc: guest path names above NAME_MAX/MAXPATHLEN answer ENOENT instead of ENAMETOOLONG #8163
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-20T01:03:10Z.
Repro
Windows host. Guest calls
stat,open,mkdir,unlink,rmdir,renameoraccesswith a path component of 256 bytes, or a path of 1024 bytes.Expected (FreeBSD 11.4 namei, sys/kern/vfs_lookup.c:328/525/704): ENAMETOOLONG (63).
Actual: ENOENT (and
renameEIO), because the resolved host path does not exist.chflagsthrows an uncaughtfilesystem_erroronce the check exists, as it resolves with the throwing form.Test:
core/libs/tests/GuestPathNameLength.cpp(fails with 0xc0000409 before the fix).Fix branch: https://github.com/xXPBSXx/AnyPS5/tree/fix/path-name-too-long-fb
AI-assisted (Claude Code).