This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6966] hsearch almost always probes the same index when using the secondary hash
- From: "bugzilla at bsb dot me dot uk" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 19 Oct 2008 01:33:40 -0000
- Subject: [Bug libc/6966] hsearch almost always probes the same index when using the secondary hash
- References: <20081019012934.6966.bugzilla@bsb.me.uk>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From bugzilla at bsb dot me dot uk 2008-10-19 01:33 -------
Created an attachment (id=3006)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3006&action=view)
Suggested fix.
The patch suggests two related changes. First, that idx be set from hval
without reducing havl % htab->size. hval2 can now be derived from hval without
generating the same probe sequence all the time. Secondly, a new variable must
be used to detect the wrap-around, since hval no longer contains the initial
value of idx.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6966
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.