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/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils