This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] PR 12028 "GDB crashes on a double free during overload resolution"
>>>>> "Sami" == sami wagiaalla <swagiaal@redhat.com> writes:
Sami> Incidentally, there is this error:
Sami> ==8467== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 9)
Sami> ==8467== Use of uninitialised value of size 8
Sami> ==8467== at 0x57C966: bcache_full (bcache.c:189)
Sami> ==8467== by 0x52E94F: add_psymbol_to_list (psymtab.c:1358)
Sami> ==8467== by 0x596634: add_partial_symbol (dwarf2read.c:3794)
Sami> ==8467== by 0x596A7A: add_partial_subprogram (dwarf2read.c:3882)
Sami> Worth figuring out but it is unrelated to this patch series.
This is fallout from your earlier bcache changes.
I'm regtesting the appended. I already ran it through valgrind, it
definitely fixes the above report. I will check it in once the regtest
reports no regressions.
Tom
2010-09-27 Tom Tromey <tromey@redhat.com>
* bcache.c (expand_hash_table): Use hash_function, not hash.
Index: bcache.c
===================================================================
RCS file: /cvs/src/src/gdb/bcache.c,v
retrieving revision 1.28
diff -u -r1.28 bcache.c
--- bcache.c 31 Aug 2010 17:26:08 -0000 1.28
+++ bcache.c 27 Sep 2010 17:16:41 -0000
@@ -184,7 +184,8 @@
struct bstring **new_bucket;
next = s->next;
- new_bucket = &new_buckets[(hash (&s->d.data, s->length)
+ new_bucket = &new_buckets[(bcache->hash_function (&s->d.data,
+ s->length)
% new_num_buckets)];
s->next = *new_bucket;
*new_bucket = s;