Mail Archives: djgpp/1996/07/08/15:31:24
> > (2) How can I trap the error condition of the stack running out of space?
> AFAIK, you can't. The main reason is that there is no such error
> condition. When the stack overflows, it just begins overwriting the
> heap. How fast and how hard will this cause a crash, depends on the program.
In V1.x under DPMI, a separate SS was set up which had an expand down limit
to catch these problems. This prevented code from being compiled with
-fomit-frame-pointer, but did give a nice stack fault when you ran out
of stack. I have a V2 subroutine I wrote back in the pre-V2 beta days
which can implement this. I'm not sure what it might break in the libc.
Maybe I'll try and find it. At one time the plan was to make this
yet another crt0 option. Humm, maybe I just though of a unique way to
work around the NT farptr problem ;-) Heh heh...
- Raw text -