Subject: Re: PR/36464 CVS commit: src/lib/libc/gen
To: None <,,>
From: Ed Ravin <>
List: netbsd-bugs
Date: 06/10/2007 01:05:09
The following reply was made to PR lib/36464; it has been noted by GNATS.

From: Ed Ravin <>
Subject: Re: PR/36464 CVS commit: src/lib/libc/gen
Date: Sat, 9 Jun 2007 21:00:20 -0400

 Christos - thanks for the quick fix, I will test it out later this
 The man page for stat(2) also needs updating, in particular this part:
 >     The size-related fields of the struct stat are as follows:
 >     st_size        The size of the file in bytes.  A directory will be a mul-
 >                    tiple of the size of the dirent(5) structure.
 Should be changed to say that the meaning of st_size for a directory is
 filesystem-dependent (the ZFS behavior of "number of entries in the
 directory" is intentional).
 On Sun, Jun 10, 2007 at 12:00:06AM +0000, Christos Zoulas wrote:
 >  Modified Files:
 >  	src/lib/libc/gen: scandir.c
 >  Log Message:
 >  PR/36464: scandir(3) corrupts heap when run on ZFS directories because ZFS
 >  returns the number of entries as the directory size.
 >  Use a new, more conservative entries estimator.