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: [RFA/HPUX] somread.c: avoid stack overflow


> Date: Wed, 4 Oct 2006 11:25:05 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> 
> Hello,
> 
> A customer of ours ran into a GDB crash that was caused by a stack
> overflow. Their executables are very large, and it turned out when
> we started debugging that the overflow happened during an alloca
> besides which there already was a FIXME:.
> 
> We replace the calls to alloca by a call to xmalloc followed by
> make_cleanup and the problem was gone.
> 
> 2006-10-04  Joel Brobecker  <brobecker@adacore.com>
> 
>         * somread.c (som_symtab_read): Avoid using alloca for potentially
>         large buffers.
> 
> Tested on pa-hpux, no regression.
> 
> OK to commit?

Looks reasonable to me.


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