Date: Thu, 6 Feb 2003 14:04:02 +0200 (EET) From: Esa A E Peuha Sender: peuha AT sirppi DOT helsinki DOT fi To: djgpp-workers AT delorie DOT com Subject: Re: Checking for stack overflow In-Reply-To: <6480-Wed05Feb2003174159+0200-eliz@is.elta.co.il> Message-ID: References: <6480-Wed05Feb2003174159+0200-eliz AT is DOT elta DOT co DOT il> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 5 Feb 2003, Eli Zaretskii wrote: > Why not jump to __djgpp_traceback_exit instead? After printing "out of stack", you mean? Maybe, but the traceback doesn't seem very useful to me in this case. > I don't think we should have this working by default, only given some > switch to GCC. Stack checking is a run-time overhead, so we shouldn't > force it on users, IMHO. Gcc already has -fstack-check for this; it just doesn't do anything useful currently. Here's another thought: how about having an uncommitted memory page just below the stack? Then stack overflow would be just like dereferencing a null pointer; caught with no run-time overhead (but only on DOS machines unfortunately). -- Esa Peuha student of mathematics at the University of Helsinki http://www.helsinki.fi/~peuha/