From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 479 invoked by alias); 2 Sep 2010 19:02:03 -0000 Received: (qmail 32754 invoked by uid 22791); 2 Sep 2010 19:02:02 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KAM_STOCKGEN,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Sep 2010 19:01:53 +0000 Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id o82J1lvL023371 for ; Thu, 2 Sep 2010 12:01:52 -0700 Received: from eyh5 (eyh5.prod.google.com [10.208.8.5]) by kpbe17.cbf.corp.google.com with ESMTP id o82J1kC9009313 for ; Thu, 2 Sep 2010 12:01:46 -0700 Received: by eyh5 with SMTP id 5so664258eyh.0 for ; Thu, 02 Sep 2010 12:01:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.34.77 with SMTP id k13mr426958ebd.77.1283454105802; Thu, 02 Sep 2010 12:01:45 -0700 (PDT) Received: by 10.220.200.73 with HTTP; Thu, 2 Sep 2010 12:01:45 -0700 (PDT) In-Reply-To: <4C7FC495.8090705@redhat.com> References: <4C6946E1.6000709@redhat.com> <4C6D5C83.3050602@redhat.com> <4C756132.5050301@redhat.com> <20100901082539.GA24609@host1.dyn.jankratochvil.net> <20100901161952.GX2986@adacore.com> <20100901164716.GY2986@adacore.com> <4C7E96FA.2080209@redhat.com> <4C7EA30B.7020007@redhat.com> <4C7EA94E.4010104@redhat.com> <4C7FC495.8090705@redhat.com> Date: Thu, 02 Sep 2010 20:25:00 -0000 Message-ID: Subject: Re: Regression for gdb.stabs/gdb11479.exp [Re: [patch 1/2] Use custom hash function with bcache] From: Doug Evans To: sami wagiaalla Cc: Tom Tromey , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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/msg00107.txt.bz2 On Thu, Sep 2, 2010 at 8:36 AM, sami wagiaalla wrote: > This sounds good to me. If we are not using a static psymbol struct should > we zero out the value union at least ? > >> 2010-09-01 =A0Doug Evans >> >> =A0 =A0 =A0 =A0 * psymtab.c (add_psymbol_to_bcache): Initialize obj_sect= ion. >> >> Index: psymtab.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: /cvs/src/src/gdb/psymtab.c,v >> retrieving revision 1.12 >> diff -u -p -r1.12 psymtab.c >> --- psymtab.c =A0 1 Sep 2010 21:50:26 -0000 =A0 =A0 =A0 1.12 >> +++ psymtab.c =A0 1 Sep 2010 22:50:05 -0000 >> @@ -1394,6 +1394,7 @@ add_psymbol_to_bcache (char *name, int n >> =A0 =A0 =A0 =A0SYMBOL_VALUE_ADDRESS (&psymbol) =3D coreaddr; >> =A0 =A0 =A0} >> =A0 =A0SYMBOL_SECTION (&psymbol) =3D 0; >> + =A0SYMBOL_OBJ_SECTION (&psymbol) =3D NULL; >> =A0 =A0SYMBOL_SET_LANGUAGE (&psymbol, language); >> =A0 =A0PSYMBOL_DOMAIN (&psymbol) =3D domain; >> =A0 =A0PSYMBOL_CLASS (&psymbol) =3D class; The value union was only zeroed out before in case sizeof (SYMBOL_VALUE) !=3D sizeof (SYMBOL_VALUE_ADDRESS) !=3D sizeof (union), to maintain a consistent hash. The code does set the value union, and we no longer hash as a byte array, so I think we're fine.