From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106103 invoked by alias); 3 Aug 2015 18:07:02 -0000 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 Received: (qmail 106090 invoked by uid 89); 3 Aug 2015 18:07:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f178.google.com Received: from mail-ig0-f178.google.com (HELO mail-ig0-f178.google.com) (209.85.213.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 03 Aug 2015 18:07:00 +0000 Received: by igk11 with SMTP id 11so77161438igk.1 for ; Mon, 03 Aug 2015 11:06:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=YV69T2sZaF8rEC/IQvgGo5iCtt2FLJru7FoEOQQpIEc=; b=gM0J+iZzzPGLFn8jCIjNQvr/S11DQpNmGKFM06H7IZRQtLxG+ip1SrymQyURTDMyS3 7HxcvPK50F2g6Pj9hmINZi2SQNERdFm+exrE73fXVSIlPtMDa8ObePfJs2wGAl9Akh9c lJIGErjHk89gSJpCPhZQfqLlu0DgY12g699z6anZSvAs4LEnblvDYLKhJC+3EBV1fLrI qCO+pZE6gwx6cUkxg0yXXbQ8eynX2MczPmDH1p59FrEZ1L6PM68+Xgs8pzh9yoUxwpxH 1rNnYdNioTCfBsRFeBdsZLC1Agljb7pIJBvqADUszgTIJFXjR8/5HRcapfNYSIAhdRZG GgJw== X-Gm-Message-State: ALoCoQmQGtmqUvAfbV86YtrrcdJh7PyxwU/e0l6AyipXX52P+qLMEPZj9cDcmbZUU4+zqZRRROfY X-Received: by 10.50.30.226 with SMTP id v2mr23590514igh.3.1438625218511; Mon, 03 Aug 2015 11:06:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.93.102 with HTTP; Mon, 3 Aug 2015 11:06:18 -0700 (PDT) In-Reply-To: <1438624857-18851-1-git-send-email-palves@redhat.com> References: <1438624857-18851-1-git-send-email-palves@redhat.com> From: Doug Evans Date: Mon, 03 Aug 2015 18:07:00 -0000 Message-ID: Subject: Re: [ob/pushed] dwarf2read.c: fix latent buglet To: Pedro Alves Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00042.txt.bz2 On Mon, Aug 3, 2015 at 11:00 AM, Pedro Alves wrote: > cust->includes is: > > struct compunit_symtab > { > ... > struct compunit_symtab **includes; > > gdb/ChangeLog: > 2015-08-03 Pedro Alves > > * dwarf2read.c (compute_compunit_symtab_includes): Use size of struct > compunit_symtab pointer. > --- > gdb/dwarf2read.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index 24a4022..b5ffd04 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -7983,7 +7983,7 @@ compute_compunit_symtab_includes (struct dwarf2_per_cu_data *per_cu) > len = VEC_length (compunit_symtab_ptr, result_symtabs); > cust->includes > = obstack_alloc (&dwarf2_per_objfile->objfile->objfile_obstack, > - (len + 1) * sizeof (struct symtab *)); > + (len + 1) * sizeof (struct compunit_symtab *)); > for (ix = 0; > VEC_iterate (compunit_symtab_ptr, result_symtabs, ix, > compunit_symtab_iter); Bleah. Since sizeof (struct symtab) < sizeof (struct compunit_symtab) (64 vs 112 for amd64) I'd suggest this for the 7.10 branch too.