pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: should be fixed: gmake[3]: *** readdir .: Invalid argument. Stop.



unfortunately, hgutch pointed out that the code does already
set errno = 0 via macro, so my change likely was a no-op that
the compiler removed reverted.)

there are some ways to trigger EINVAL from eg ufs_readdir():

   1612         if (callerbytes < _DIRENT_MINSIZE(dirent)) {
   1613                 /* no room for even one struct dirent */
   1614                 return EINVAL;

   1653         if (physstart >= physend) {
   1654                 /* Need at least one block */
   1655                 return EINVAL;

   1693         /* Base buffer space for CALLERBYTES of new data */
   1694         rawbufmax = callerbytes + skipstart;
   1695         if (rawbufmax < callerbytes) 
   1696                 return EINVAL;

   1699         if (rawbufmax < _DIRENT_MINSIZE(rawdp)) {
   1700                 /* no room for even one struct direct */
   1701                 return EINVAL;

   1747         while (rawdp < stoprawdp) {
...
   1749                 if (skipstart > 0) {
   1750                         /* drain skipstart */
   1751                         if (rawdp->d_reclen <= skipstart) {
   1752                                 skipstart -= rawdp->d_reclen;
   1753                                 rawdp = _DIRENT_NEXT(rawdp);
   1754                                 continue;
   1755                         }
   1756                         /* caller's start position wasn't on an entry */
   1757                         error = EINVAL;

(unless it's working /tmp, all my failures of this are in UFS,
hence looking here.)


.mrg.


Home | Main Index | Thread Index | Old Index