GNU bug report logs - #6551
[PATCH] hash: extend module to deal with non-pointer keys

Previous Next

Package: coreutils;

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

From: Paul Eggert <eggert <at> CS.UCLA.EDU>
To: Jim Meyering <jim <at> meyering.net>
Cc: bug-coreutils <at> gnu.org, bug-gnulib <at> gnu.org, 6524 <at> debbugs.gnu.org
Subject: bug#6551: [PATCH] hash: extend module to deal with non-pointer keys
Date: Thu, 01 Jul 2010 17:07:00 -0700
On 07/01/10 15:59, Jim Meyering wrote:

> Can you give me a backtrace?
> Even if your patch is clearly better, I'd like to know
> how my code is malfunctioning.

Sure.  This uses your older patch, not the newer gnulib one.

Program received signal SIGABRT, Aborted.
0x0012d422 in __kernel_vsyscall ()
(gdb) where
#0  0x0012d422 in __kernel_vsyscall ()
#1  0x00158651 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x0015ba82 in *__GI_abort () at abort.c:92
#3  0x08054826 in hash_insert0 (table=0x805f208, entry=0x8017384d, matched_ent=0x0) at hash.c:1078
#4  0x0804bdba in di_set_insert (dis=0x805e2f4, dev=2049, ino=380435) at di-set.c:264
#5  0x0804ab0f in hash_ins (argc=52, argv=0xbffff304) at du.c:335
#6  process_file (argc=52, argv=0xbffff304) at du.c:467
#7  du_files (argc=52, argv=0xbffff304) at du.c:592
#8  main (argc=52, argv=0xbffff304) at du.c:962

The test case, by the way, is "./du ../../cu*", where the
globbing pattern expands to 51 directories, each a copy of coreutils,
with several hard links because many are git clones of each other.
Arf arf!  (I'm eating my own dog food.)


> Using unions is one way to avoid casts (and certain warnings).

Yes; but ouch!  That's jumping into the fire!  I suspect it's even less
likely to work on weird architectures.  I'd rather stay in the frying pan.




This bug report was last modified 13 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.