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]

[RFA/HPUX] somread.c: avoid stack overflow


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?

Thanks,
-- 
Joel

Attachment: som.diff
Description: Text document


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