From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1872 invoked by alias); 27 Sep 2010 17:18:16 -0000 Received: (qmail 1863 invoked by uid 22791); 27 Sep 2010 17:18:15 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Sep 2010 17:18:10 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8RHI67S029842 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Sep 2010 13:18:06 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8RHI5fE009777; Mon, 27 Sep 2010 13:18:06 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o8RHI5h2020550; Mon, 27 Sep 2010 13:18:05 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id C3A84378183; Mon, 27 Sep 2010 11:18:04 -0600 (MDT) From: Tom Tromey To: sami wagiaalla Cc: Doug Evans , gdb-patches@sourceware.org Subject: Re: [patch] PR 12028 "GDB crashes on a double free during overload resolution" References: <4C937E2D.80500@redhat.com> <4C9A2B89.4080601@redhat.com> <4C9B7CB1.7030208@redhat.com> Date: Mon, 27 Sep 2010 18:02:00 -0000 In-Reply-To: <4C9B7CB1.7030208@redhat.com> (sami wagiaalla's message of "Thu, 23 Sep 2010 12:13:37 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00451.txt.bz2 >>>>> "Sami" == sami wagiaalla 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 * 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;