alloca is bad?

Michael Meissner meissner@cygnus.com
Mon Nov 13 12:21:00 GMT 2000


On Mon, Nov 13, 2000 at 03:20:23PM -0500, Nick Duffek wrote:
> On 12-Nov-2000, Michael Meissner wrote:
> 
> >For malloc overruns, I typically just link in with -lefence or other
> >tools, and it is fairly obvious where the bug is.
> 
> For alloca overruns, one could get similar results by recompiling with
> libiberty's alloca and linking with -lefence.

That won't work, since alloca is a builtin provided by GCC.  If GCC is detected
as the compiler at configuration time, then alloca is not even built into
libiberty.  On systems like Linux and *BSD, there is typically no other
compiler except GCC.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


More information about the Gdb mailing list