GNU bug report logs -
#6551
[PATCH] hash: extend module to deal with non-pointer keys
Previous Next
Reported by: Paul Eggert <eggert <at> CS.UCLA.EDU>
Date: Thu, 1 Jul 2010 22:40:03 UTC
Severity: normal
Tags: patch
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Re the patch you just reported in:
<http://lists.gnu.org/archive/html/bug-gnulib/2010-07/msg00005.html>
I assume this is to support the du performance improvement that was proposed in
<http://debbugs.gnu.org/db/65/6524.html>. I see that you incorporated a further
improvement in the gnulib patch, namely, support for NULL keys.
The gnulib change seems fine, but I noticed some problems with the coreutils
part of that earlier proposal. Among other things, it makes du dump core on a
(large) test case that I have locally. I don't know why (perhaps there
were further fixes to the gnulib part that I didn't get right?). I found
out about the core dump only because I had independently prepared a patch
that I think is better: it uses a bit less memory and is quite a bit simpler.
I'll try to merge my patch with your gnulib change and send it off to
bug-coreutils in the next day or two.
My patch, by the way, doesn't hash pointer keys: it just uses size_t values
and casts them to void * (which is what the hash package wants). This trick
works on all architectures that I know about, but it isn't guaranteed by
C or POSIX and the casts are a bit offputting, so it'd be nice if the hash
package supported hashing size_t keys directly. That's lower priority, though.
This bug report was last modified 14 years and 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.