Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eirik Fuller <eirik@hackrat.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [patch] read_command_lines can return freed memory
Date: Fri, 15 Jun 2001 11:40:00 -0000	[thread overview]
Message-ID: <20010615184039.230C340014@hackrat.com> (raw)
In-Reply-To: <3B2A2258.639532FC@redhat.com>

I backed out the patch to read_command_lines, confirmed that the crash
occurs again, applied the patch to free_command_lines, and confirmed
that the crash no longer occurs.

I agree that patching free_command_lines is the right way to fix this.

> we should think of a more contrived example to create a test case...

Here's the simplest test case I've found which triggers the crash:


define f0
    set $f = $arg0
    if $f[1]
	if $f[2]
	    f2
	else
	    f1
    else


You can also add stuff after the second else.  As before, source that
file twice; the second time triggers the crash.  It's likely that the
details of the crash (including whether it occurs at all) vary from
platform to platform; I'm using a Debian x86 system with libc6 2.2.3.

Thanks,
Eirik


  reply	other threads:[~2001-06-15 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010615080029.8484D40014@hackrat.com>
2001-06-15  8:00 ` Fernando Nasser
2001-06-15 11:40   ` Eirik Fuller [this message]
2001-06-15 12:04     ` Fernando Nasser
2001-06-17  8:16       ` Fernando Nasser

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=20010615184039.230C340014@hackrat.com \
    --to=eirik@hackrat.com \
    --cc=fnasser@redhat.com \
    --cc=gdb-patches@sourceware.cygnus.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