This is the mail archive of the gdb-patches@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: [PATCH] testsuite: Avoid a buffer overrun in `gdb.base/maint.exp'


On Fri, 28 Oct 2016, Pedro Alves wrote:

> >  I've looked into adjusting the size of the buffer dynamically as the 
> > `full_buffer' condition triggers and in principle it appears doable with 
> > the tools TCL and `expect' provide and no need to bend backwards to get it 
> > done, however it seems to require more than just a trivial intervention in 
> > `gdb_test_multiple', so I have decided to leave it for the next time the 
> > issue triggers.  Maybe it won't.
> > 
> >  Needless to say, this change has passed `mips-mti-linux-gnu' regression 
> > testing.  OK to apply?
> 
> I saw this too yesterday after fixing:
> 
>  https://sourceware.org/ml/gdb-patches/2016-10/msg00786.html
> 
> but came up with a different fix.  This one does not require growing
> the buffer dynamically.  We instead parse output as is comes, with
> exp_continue, which should fix the problem for good.
> 
> WDYT?

 It works for me and should put less stress on Expect.  Thanks!

  Maciej


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