Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [ob/pushed] dwarf2read.c: fix latent buglet
Date: Mon, 03 Aug 2015 18:01:00 -0000	[thread overview]
Message-ID: <1438624857-18851-1-git-send-email-palves@redhat.com> (raw)

cust->includes is:

struct compunit_symtab
{
...
  struct compunit_symtab **includes;

gdb/ChangeLog:
2015-08-03  Pedro Alves  <palves@redhat.com>

	* 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);
-- 
1.9.3


             reply	other threads:[~2015-08-03 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 18:01 Pedro Alves [this message]
2015-08-03 18:07 ` Doug Evans
2015-08-03 18:14   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438624857-18851-1-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox