From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21668 invoked by alias); 3 Sep 2010 15:40:27 -0000 Received: (qmail 21659 invoked by uid 22791); 3 Sep 2010 15:40:25 -0000 X-SWARE-Spam-Status: No, hits=-1.1 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) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Sep 2010 15:40:20 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id o83FeHc9030600 for ; Fri, 3 Sep 2010 08:40:17 -0700 Received: from pwj10 (pwj10.prod.google.com [10.241.219.74]) by hpaq12.eem.corp.google.com with ESMTP id o83FeGqg029647 for ; Fri, 3 Sep 2010 08:40:16 -0700 Received: by pwj10 with SMTP id 10so406020pwj.25 for ; Fri, 03 Sep 2010 08:40:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.88.15 with SMTP id l15mr133289wab.191.1283528411595; Fri, 03 Sep 2010 08:40:11 -0700 (PDT) Received: by 10.220.200.73 with HTTP; Fri, 3 Sep 2010 08:40:11 -0700 (PDT) In-Reply-To: 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: Fri, 03 Sep 2010 15:59: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/msg00128.txt.bz2 On Thu, Sep 2, 2010 at 12:01 PM, Doug Evans wrote: > On Thu, Sep 2, 2010 at 8:36 AM, sami wagiaalla wrot= e: >> This sounds good to me. If we are not using a static psymbol struct shou= ld >> 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_sec= tion. >>> >>> 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. Blech. "never mind". We do need the memset. The hash still includes sizeof (ginfo.value), which is reasonable (I thought it didn't for some reason). gcc turns it in to a move instruction anyway so no worries there.