This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]