This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: alloca is bad?
On Sat, Nov 11, 2000 at 07:51:36PM +0000, Fernando Nasser wrote:
>Someone said that heap corruption was harder to track than stack
>corruption.
>
>I couldn't disagree more. Many (most?) of the times the function tries
>to return and gets a buggy return address and frame pointer.
>It then crashes and you have no idea where it happened.
Someone, i.e., me, has pointed out that stack overruns happen when you
use auto arrays and pointers to auto variables. I don't see how you can
use this as an argument unless you are advocating that we should only
use static variables.
cgf