From: Fernando Nasser <fnasser@cygnus.com>
To: Eirik Fuller <eirik@hackrat.com>
Cc: Fernando Nasser <fnasser@redhat.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: [patch] read_command_lines can return freed memory
Date: Fri, 15 Jun 2001 12:04:00 -0000 [thread overview]
Message-ID: <3B2A5C37.3668BC4B@cygnus.com> (raw)
In-Reply-To: <20010615184039.230C340014@hackrat.com>
Thanks for testing it and for the test case.
If you agree, I will modify your changelog entry to:
2001-06-15 Eirik Fuller <eirik@hackrat.com>
* cli/cli-script.c (free_command_lines): Reset list pointer.
and check the second version of the patch in.
And thanks again for the bug report/fix.
Regards,
Fernando
Eirik Fuller wrote:
>
> 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
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
next prev parent reply other threads:[~2001-06-15 12:04 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
2001-06-15 12:04 ` Fernando Nasser [this message]
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=3B2A5C37.3668BC4B@cygnus.com \
--to=fnasser@cygnus.com \
--cc=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