macOS fails a host path of 1024 bytes or more with ENAMETOOLONG, and the
host form of a guest path is the root directory followed by the guest
path, so a guest path of 1023 bytes, which FreeBSD accepts, fails there
under any root directory. guest_path_name_length skips that check on
macOS, and a debt entry for guest path names gives the macOS limit.
stat, open, mkdir, rename and the other calls that resolve a guest path answered ENOENT (or EIO for rename) for a name longer than 255 bytes or a path of 1024 bytes or more, because the host path just did not exist. FreeBSD 11.4's namei fails a component above NAME_MAX and a path of MAXPATHLEN bytes with ENAMETOOLONG. Check both limits on the guest string before it is resolved; FilesystemError already maps the error to 63.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>