Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix crash in svr4_clear_so
Date: Wed, 22 May 2013 10:32:00 -0000	[thread overview]
Message-ID: <20130522103247.GA8759@blade.nx> (raw)
In-Reply-To: <ye6qa9no55vu.fsf@elbrus2.mtv.corp.google.com>

Paul Pluzhnikov wrote:
> Using current trunk, I've got a GDB core dump when I tried to analyze
> mis-matched binary and core:
...
> Index: solib-svr4.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/solib-svr4.c,v
> retrieving revision 1.177
> diff -p -u -r1.177 solib-svr4.c
> --- solib-svr4.c	6 May 2013 22:18:38 -0000	1.177
> +++ solib-svr4.c	21 May 2013 22:19:09 -0000
> @@ -971,7 +971,8 @@ svr4_free_so (struct so_list *so)
>  static void
>  svr4_clear_so (struct so_list *so)
>  {
> -  so->lm_info->l_addr_p = 0;
> +  if (so->lm_info != NULL)
> +    so->lm_info->l_addr_p = 0;
>  }
>  
>  /* Free so_list built so far (called via cleanup).  */

Looks good to me.

Thanks,
Gary

-- 
http://gbenson.net/


      parent reply	other threads:[~2013-05-22 10:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 22:23 Paul Pluzhnikov
2013-05-21 23:14 ` Doug Evans
2013-05-22 10:32 ` Gary Benson [this message]

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=20130522103247.GA8759@blade.nx \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.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