Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: "Martin M. Hunt" <hunt@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] small patch to command_line_handler
Date: Fri, 07 Jun 2002 14:52:00 -0000	[thread overview]
Message-ID: <15617.11001.177860.235426@localhost.redhat.com> (raw)
In-Reply-To: <200206071312.07163.hunt@redhat.com>

Martin M. Hunt writes:
 > Please check this carefully because I don't really understand the code here.
 > 
 > I'm trying to track down some memory trashing and random crashes and the 
 > command line handler is reading memory it didn't allocate, which is mostly 
 > harmless, but annoying and bad programming.  So here's a proposed fix.
 > 

Hmmm, odd.  Martin, can you look at what happened to this thread that
reported the very same error? I thought this got fixed.

http://sources.redhat.com/ml/gdb-patches/2002-03/msg00533.html

Thanks
Elena


 > -- 
 > Martin Hunt
 > GDB Engineer
 > Red Hat, Inc.
 > 
 > 2002-06-07  Martin M. Hunt  <hunt@redhat.com>
 > 
 > 	* event-top.c (command_line_handler): Don't read past
 > 	beginning of buffer.
 > 
 > Index: event-top.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/event-top.c,v
 > retrieving revision 1.20
 > diff -u -u -r1.20 event-top.c
 > --- event-top.c	27 Mar 2002 21:20:15 -0000	1.20
 > +++ event-top.c	7 Jun 2002 20:08:32 -0000
 > @@ -681,7 +681,7 @@
 >  
 >    xfree (rl);			/* Allocated in readline.  */
 >  
 > -  if (*(p - 1) == '\\')
 > +  if (p > linebuffer && *(p - 1) == '\\')
 >      {
 >        p--;			/* Put on top of '\'.  */
 >  


  reply	other threads:[~2002-06-07 21:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-07 13:12 Martin M. Hunt
2002-06-07 14:52 ` Elena Zannoni [this message]
2002-06-07 17:37   ` Martin M. Hunt
2002-06-12 18:43     ` Andrew Cagney

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=15617.11001.177860.235426@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=hunt@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