Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
syscall: Getdirentries on freebsd 11 is broken #31416
It converts old, smaller records into new, bigger records. It tries to account for the size increase by calling the syscall with a smaller buffer (1/4 the size). But it also has a lower bound on the minimum size, so the syscall buffer may in fact be no smaller than the original buffer. As a result, when copying from the syscall buffer to the output buffer, there may not be room for all the listed files. The code silently drops the files that don't fit.
The patch below will at least panic in that situation. The freebsd port needs to be fixed somehow. The new test
Split off from #31403
Dirent doesn't work properly. Diable the test for now. Update #31416 Change-Id: I34a8045598a9c303dcc754ce04da3c124f122d1a Reviewed-on: https://go-review.googlesource.com/c/go/+/171818 Reviewed-by: Bryan C. Mills <email@example.com> Run-TryBot: Bryan C. Mills <firstname.lastname@example.org> Run-TryBot: Keith Randall <email@example.com> TryBot-Result: Gobot Gobot <firstname.lastname@example.org>