From: Martin Str|mberg Message-Id: <199908220823.KAA29287@father.ludd.luth.se> Subject: Re: stack overruns (was: fixed stack size) To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS) Date: Sun, 22 Aug 1999 10:23:22 +0200 (MET DST) X-Mailer: ELM [version 2.4ME+ PL15 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hans-Bernhard said: > Same problem as with the guard page approach: if the stack is overflown, > if will often happen in one large step, without touching all addresses in > between. Think of someone using a double a[200000]; local variable. > Stack corruption happens, but your guard value will only be hit if > that array is actually modified. I'm aware of that, but this one is very cheap to implement. And it will catch too deep function nesting, I think. Does anybody know why cc1 or whatever programs must have a larger stack? It surely isn't because it declares huge arrays locally without trying to use them, right? What do you people think, will this be useful enough to warrant implementation? By the way, what data is first overwritten by a stack overrun? Diamanda Galas, The Divine Punishment, MartinS