bug-findutils
[Top][All Lists]
Advanced

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

[bug #19616] leaf optimisation and loop detection broken in 4.3.3


From: James Youngman
Subject: [bug #19616] leaf optimisation and loop detection broken in 4.3.3
Date: Tue, 17 Apr 2007 09:00:33 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2)

URL:
  <http://savannah.gnu.org/bugs/?19616>

                 Summary: leaf optimisation and loop detection broken in
4.3.3
                 Project: findutils
            Submitted by: jay
            Submitted on: Tuesday 04/17/2007 at 09:00
                Category: find
                Severity: 4 - Important
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: jay
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.3.3
           Fixed Release: None

    _______________________________________________________

Details:

In find.c, we have this code around line 1164:

  /* Now we really need to stat the directory, even if we know the
   * type, because we need information like struct stat.st_rdev.
   */
  if (0 == stat_buf.st_mode)
    {
      /* This call was made conditional on Sat Apr 14 16:01:01 2007,
       * and at that time the test suite passed without it.  Omitting
       * this stat call saves a lot of system calls.
       */
      if (get_statinfo(pathname, name, &stat_buf) != 0)
        return 0;

      state.have_stat = true;
    }

The conditional nature of that code is incorrect; the function goes on to use
stat_buf.st_rdev assuming it is valid. and stat_buf.st_nlinks is used later
too.  This probably breaks the leaf optimisation and loop detection.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?19616>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]