public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: John Fine <johnsfine@verizon.net>
To: Keith Seitz <keiths@redhat.com>
Cc: insight@sourceware.org
Subject: Re: Can't debug x86_64 C++ programs.
Date: Thu, 18 Sep 2008 22:27:00 -0000	[thread overview]
Message-ID: <48D12E6A.5030804@verizon.net> (raw)
In-Reply-To: <48D0A482.8060000@redhat.com>

Keith Seitz wrote:
>> If I try to view the registers window anytime after pressing Run, the 
>> whole debugger crashes.  If I view the register window first, it 
>> appears, then when I press run it populates, then a moment later the 
>> whole debugger crashes.
>
> Once again, I am sorry, but I cannot reproduce this (on x86).
>
Can you give me an expert opinion on these lines of code in gdbtk-register.c

  regformat = (int *)xcalloc (numregs, sizeof(int));
  regtype = (struct type **)xcalloc (numregs, sizeof(struct type **));

especially that sizeof(int)

I know that whatever object lies directly in physical ram before the 
allocation of regtype has overflowed and corrupted regtype.

I think the above allocations happen early enough in initialization that 
they would sequentially grab new memory (rather than reuse chunks that 
would tend to be distant from each other).

So (barely more than guess) I think regformat is the object using more 
memory than was allocated for it and overflowing into regtype.

  parent reply	other threads:[~2008-09-17 16:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 20:53 John Fine
2008-09-18 21:19 ` Keith Seitz
2008-09-18 21:37   ` John Fine
2008-09-19  7:26     ` Keith Seitz
2008-09-19 14:27       ` John Fine
2008-09-19 18:47         ` Keith Seitz
2008-09-18 22:11   ` John Fine
2008-09-18 22:27   ` John Fine [this message]
2008-09-18 23:04     ` Keith Seitz
2008-09-18 23:25       ` John Fine
2008-09-19  8:20         ` Keith Seitz
2008-09-19 13:27           ` John Fine
2008-09-19 16:38             ` Keith Seitz
2008-09-20 21:22               ` John Fine
2008-09-22 18:35                 ` John Fine
2008-09-19  2:17 ` Keith Seitz

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=48D12E6A.5030804@verizon.net \
    --to=johnsfine@verizon.net \
    --cc=insight@sourceware.org \
    --cc=keiths@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).