www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/28/19:06:50

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199602282348.AA195831299@relay1.geis.com>
Date: Wed, 28 Feb 96 23:26:00 UTC 0000
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: GDB discovers another one!

Reply to message 2315230    from OANDICO AT EEE DOT U on 02/28/96  8:11PM


> This evil stack overflow thing has happened a lot of times, it seems. I
> didn't get stack overflow errors either when my program crashed... seems
> like a "feature" which cropped up along with DJGPP V2 -- the standard
> stack (256K) is too small.

Yeah.  I didn't even know there COULD be a problem until, all of a sudden, some
large static arrays started getting garbage dumped in the middle.  I think the
overflows even corrupted some dynamic arrays.  :(  I know how to change the
default stack size in Turbo Pascal, but I never even considered it in C.  Guess
I
know better now.

> An easier (ugly) way to fix your problem would have been to STUBEDIT the
> resulting EXE you got and increase the stack size to something nice (4
> Meg works well for me, thank you).

Hehe - that's going a little too far for me, I think.  :)  With a stack like
that, half of the
program would be in virtual memory, and that would slow it down quite a bit!
(I only
have 8 megs of RAM).  I guess I'll go look in the FAQ to see how to modify the
size of the stack on compilation...

John

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019