delorie.com/archives/browse.cgi | search |
From: | sandmann AT clio DOT rice DOT edu (Charles Sandmann) |
Message-Id: | <10302111440.AA01702@clio.rice.edu> |
Subject: | Re: Checking for stack overflow |
To: | djgpp-workers AT delorie DOT com |
Date: | Tue, 11 Feb 2003 08:40:00 -0600 (CST) |
In-Reply-To: | <Pine.OSF.4.51.0302111407150.31931@sirppi.helsinki.fi> from "Esa A E Peuha" at Feb 11, 2003 02:19:18 PM |
X-Mailer: | ELM [version 2.5 PL2] |
Mime-Version: | 1.0 |
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 |
> No, we shouldn't push anything to the stack, so we can't do the addition > here. But if we put __djgpp_stack_limit + _stklen into another variable > (maybe call it __djgpp_heap_bottom) then it's quite possible to check > that too. OK to commit? I would rather call it something like __djgpp_stack_top (it may not be related at all to heap) if we did it. I think the change to "jb" fixes the signed-ness issue - so I'm not sure this is really needed. The new top limit will causes problems with interrupt wrappers since they live in heap space - fix is not to compile anything used in a wrapper with check stack I'd be interested to see this working, see how much of a run-time impact it has, and how much checking the second limit changes the run-time performance.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |