Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb-patches@sources.redhat.com
Cc: Daniel Jacobowitz <drow@false.org>
Subject: Re: [patch] nto target: fix null pointer dereference
Date: Wed, 13 Aug 2008 15:47:00 -0000	[thread overview]
Message-ID: <48A301BD.4080808@qnx.com> (raw)
In-Reply-To: <20080812213207.GA30766@caradoc.them.org>

Daniel Jacobowitz wrote:
> On Tue, Aug 12, 2008 at 05:25:40PM -0400, Aleksandar Ristovski wrote:
>> in procfs_create_inferior we call solib_create_inferior_hook, which will end up trying to determine loader base by reading inferior's memory at DT_DEBUG pointer. In our case, before the executable actually started executing, it will successfully read 0s, because dynamic loader  has not been invoked yet, and the pointer to r_debug structure is not initialized.
> 
> It should already detect that zero is invalid, since that's the same
> value used initially; see e.g. calls to locate_base.  Where's the read
> come from?
> 
nto_procfs.c::LM_ADDR gets called only by nto_relocate_section_addresses which replaces svr4_relocate_section_addresses. There is a slight difference in the way we treat l_addr address comparing to svr4.

I will repost modified patch shortly.


  reply	other threads:[~2008-08-13 15:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12 18:33 Ulrich Weigand
2008-08-12 21:26 ` Aleksandar Ristovski
2008-08-12 21:32   ` Daniel Jacobowitz
2008-08-13 15:47     ` Aleksandar Ristovski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-14 20:51 Ulrich Weigand
2008-08-13 13:30 Ulrich Weigand
2008-08-13 15:50 ` Aleksandar Ristovski
2008-08-14 20:46   ` Aleksandar Ristovski
2008-08-12 16:38 Aleksandar Ristovski

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=48A301BD.4080808@qnx.com \
    --to=aristovski@qnx.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.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