remote/2154: cached buffer pointers not updated after executing new getpkt

Daniel Jacobowitz drow@false.org
Thu Aug 10 03:18:00 GMT 2006


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



More information about the Gdb-prs mailing list