Mail Archives: djgpp-workers/2003/02/12/04:15:32
On Tue, 11 Feb 2003, Charles Sandmann wrote:
> I would rather call it something like __djgpp_stack_top (it may not
> be related at all to heap) if we did it.
I committed patch for __djgpp_stack_top; we should have it anyway
because __djgpp_stack_limit + _stklen won't be the real top of stack if
it's not aligned to 8-byte boundary.
> I think the change to "jb" fixes the signed-ness issue - so I'm not
> sure this is really needed.
I don't understand. Do you mean that a single unsigned comparsion
against __djgpp_stack_limit is enough? It's not; it's even worse than
the single signed comparsion (if esp ever wraps below zero, the unsigned
comparsion will never detect it, while the signed one will usually do).
> 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
Yes, anything that puts esp outside the application stack certainly
shouldn't be compiled with -fstack-check.
> 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.
I'll provide two version of patched gcc, one with one signed comparsion
and the other with two unsigned ones.
--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/
- Raw text -