From patchwork Mon Aug 3 18:00:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 7983 Received: (qmail 96349 invoked by alias); 3 Aug 2015 18:01:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 96335 invoked by uid 89); 3 Aug 2015 18:01:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 03 Aug 2015 18:01:00 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 40D403423DC for ; Mon, 3 Aug 2015 18:00:59 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t73I0v9o001810 for ; Mon, 3 Aug 2015 14:00:58 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [ob/pushed] dwarf2read.c: fix latent buglet Date: Mon, 3 Aug 2015 19:00:57 +0100 Message-Id: <1438624857-18851-1-git-send-email-palves@redhat.com> 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);