This is the same bug as bug 12165, but for the 64-bit versions of readdir_r. The d_ino == 0 check needs to be removed: diff --git a/sysdeps/unix/sysv/linux/readdir64_r.c b/sysdeps/unix/sysv/linux/readdir64_r.c index e87882ee06..168914ef67 100644 --- a/sysdeps/unix/sysv/linux/readdir64_r.c +++ b/sysdeps/unix/sysv/linux/readdir64_r.c @@ -95,10 +95,8 @@ __readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result) continue; } } - - /* Skip deleted and ignored files. */ } - while (dp->d_ino == 0); + while (0); if (dp != NULL) {
The master branch has been updated by Florian Weimer <fw@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6f3f6c506cdaf981a4374f1f12863b98ac7fea1a commit 6f3f6c506cdaf981a4374f1f12863b98ac7fea1a Author: Florian Weimer <fweimer@redhat.com> Date: Sat Sep 21 19:32:34 2024 +0200 Linux: readdir64_r should not skip d_ino == 0 entries (bug 32126) This is the same bug as bug 12165, but for readdir_r. The regression test covers both bug 12165 and bug 32126. Reviewed-by: DJ Delorie <dj@redhat.com>
Fixed for 2.41.