This is possible on bcachefs (stat --file-system /mnt/bcachefs says 512 bytes in a dirent, koverstreet/bcachefs#733 has a test script; not sure if that limit includes a final NUL).
Create the file like this:
i=256; touch "$(printf "%05d" ${i})$(head -c $((${i}-5)) /dev/zero | tr '\0' 'a')"
The backtrace looks like (as of 49023ad):
5: fish::common::cstr2wcstring
at ./src/common.rs:1185:18
6: fish::wutil::dir_iter::DirIter::next
at ./src/wutil/dir_iter.rs:282:27
7: fish::wildcard::expander::WildCardExpander::expand_trailing_slash
at ./src/wildcard.rs:667:41
8: fish::wildcard::expander::WildCardExpander::expand
at ./src/wildcard.rs:528:21
Apparently there are 256 byte slices in dirent structs returned from the libc crate: https://docs.rs/libc/latest/libc/struct.dirent.html
gdb can printf the rest of the string so the slice length is incorrect.
std's own read_dir will probably work better.
This is possible on bcachefs (stat --file-system /mnt/bcachefs says 512 bytes in a dirent, koverstreet/bcachefs#733 has a test script; not sure if that limit includes a final NUL).
Create the file like this:
The backtrace looks like (as of 49023ad):
Apparently there are 256 byte slices in dirent structs returned from the libc crate: https://docs.rs/libc/latest/libc/struct.dirent.html
gdb can printf the rest of the string so the slice length is incorrect.
std's own read_dir will probably work better.