This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: getdents64 problem


Thinking more about it, the patch I just send out is not correct.  The
code currently in glibc is correct.  You are using the readdir
interface (and implicitly getdents) which is restricted to file and
directory sizes of <2GB.  If the file is reported with an offset >2GB
getdents should return EOVERFLOW.  This is I what I guess happens and
it is correct.  If the program is printing only the previously
returned entries and then does nothing, the program is broken.  It
must report the overflow.  Or even better use readdir64 or use
-D_FILE_OFFSET_BITS=64.

In any case, I don't think there is a bug at all in glibc.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]