delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/08/15:31:24

Xref: news2.mv.net comp.os.msdos.djgpp:5739
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What if I run out of store?
Date: Mon, 08 Jul 1996 11:39:07 CDT
Organization: Rice University, Houston, Texas
Lines: 13
Message-ID: <31e139ab.sandmann@clio.rice.edu>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 960708160546 DOT 29655A-100000 AT is>
Reply-To: sandmann AT clio DOT rice DOT edu
NNTP-Posting-Host: clio.rice.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> >   (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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019