This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH] Add support for tracking/evaluating dwarf2 location expressions


On Apr 6,  3:10pm, Daniel Berlin wrote:

> On Fri, 6 Apr 2001, Andrew Cagney wrote:
> 
> > > >   value_ptr stack[64];
> > > > Is there a constant for this?  A quick glance at decode_locdesc() and it
> > > > has the same hardwired constant.
> > > Nobody has ever produced location expressions that need more.
> >
> > The problem typically isn't with what people are doing intentionally but
> > rather unintentionally.  The code opens the way for an input file to
> > cause gdb to overflow a buffer and trash its stack.
> 
> Well, as I said, it will trash  GCC as well, since they do no range
> checking, and have the exact same limit.
> But i'll range check it, just the same.

Maybe GCC has been designed so that it'll never need a bigger stack. 
But keep in mind that GDB needs to accept as input the output of
compilers other than GCC.  Perhaps some other compiler, through either
a bug or a feature, will produce more complicated location expressions
than GCC.

Anyway, I'm glad you've added the range check.

Kevin


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