[Top][All Lists]

[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: Gecko/20060830 Firefox/ (Debian-1.5.dfsg+


                 Summary: leaf optimisation and loop detection broken in
                 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



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:


  Message sent via/by Savannah

reply via email to

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