This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: remote/2154: cached buffer pointers not updated after executing new getpkt
- From: Daniel Jacobowitz <drow at false dot org>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 10 Aug 2006 03:18:01 -0000
- Subject: Re: remote/2154: cached buffer pointers not updated after executing new getpkt
- Reply-to: Daniel Jacobowitz <drow at false dot org>
The following reply was made to PR remote/2154; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@false.org>
To: strauman@slac.stanford.edu
Cc: gdb-gnats@sources.redhat.com
Subject: Re: remote/2154: cached buffer pointers not updated after executing new getpkt
Date: Wed, 9 Aug 2006 23:11:50 -0400
On Thu, Aug 10, 2006 at 02:54:17AM -0000, strauman@slac.stanford.edu wrote:
> At many places in remote.c the buffer pointer is cached
>
> char *buf = rs->buf;
>
> but not updated after executing getpkt(&rs->buf,...).
> If rs->buf is ever reallocated then the cached pointer
> is invalid.
Thanks! I don't have time to look at the patch right now,
but from your description, this is definitely something I didn't
think of (and really the char *buf variables were just to reduce
the size of the patch introducing rs->buf; probably time for them to go
away now).
--
Daniel Jacobowitz
CodeSourcery