This is the mail archive of the gdb@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: alloca is bad?


> Date: Sun, 12 Nov 2000 23:15:54 +0000
> From: Fernando Nasser <fnasser@cygnus.com>
> 
> As Andrew explained in his message, if the stack is
> corrupted the PC and FP can (and probably will) be clobbered with
> the garbage when the function returns.

They could, yes; but in practice (at least in my experience), the
clobbered return address is caught by the OS protection in most cases,
so the program will GPF before the PC is garbled.

> Bottom line: for most stack corruption problems, no "where" ("backtrace")

In my experience, in most cases, there is in fact at least the frame
where it crashed.  You should be able to start debugging from there.

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