Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: aristovski@qnx.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] nto target: fix null pointer dereference
Date: Tue, 12 Aug 2008 18:33:00 -0000	[thread overview]
Message-ID: <200808121832.m7CIWcIw018392@d12av02.megacenter.de.ibm.com> (raw)

Aleksandar Ristovski wrote:

>diff -u -p -r1.25 nto-tdep.c
>--- gdb/nto-tdep.c	23 Jul 2008 13:36:00 -0000	1.25
>+++ gdb/nto-tdep.c	12 Aug 2008 16:33:18 -0000
>@@ -266,6 +266,8 @@ LM_ADDR (struct so_list *so)
> {
>   struct link_map_offsets *lmo = nto_fetch_link_map_offsets ();
> 
>+  if (so->lm_info->lm == NULL)
>+	return 0;
>   return extract_typed_address (so->lm_info->lm + lmo->l_addr_offset,
>                                 builtin_type_void_data_ptr);
> }

I'm wondering how this can ever be NULL ... I understand nto
reuses the solib-svr4.c version of current_sos, which seems
to always initalize the lm member.

Can you explain what the situation is that leads to a NULL
pointer here?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


             reply	other threads:[~2008-08-12 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12 18:33 Ulrich Weigand [this message]
2008-08-12 21:26 ` Aleksandar Ristovski
2008-08-12 21:32   ` Daniel Jacobowitz
2008-08-13 15:47     ` Aleksandar Ristovski
  -- 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=200808121832.m7CIWcIw018392@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=aristovski@qnx.com \
    --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