delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/08/12/01:30:47

From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson)
Subject: Re: rm -rf -> Circular directory structure
12 Aug 1997 01:30:47 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199708120733.RAA29256.cygnus.gnu-win32@mundook.cs.mu.OZ.AU>
References: <33EF7405 DOT AADDD43E AT crec DOT mipt DOT ru>
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

"Igor V. Kovalenko" <iko AT crec DOT mipt DOT ru> writes:

>Looking at ...include/sys/types.h I found that ino_t is actually
>unsigned short, that is only 16 bit in size. Thus, we (in 'rm' etc..)
>do compare the lower 16 bits of prepared by hash_path_name()
>32-bit integer.
>  I think this is a main cause for $subj$, though the hashing
>function itself is not as perfect as it could be (in theory).

The whole idea of using a hash function to compute inode numbers
is fundamentally broken.  Perhaps it would be better to think
about a solution that works rather than making a fundamentally
broken one slightly less broken.

--
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019