delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/15/11:01:33

Date: Sun, 15 Aug 1999 13:59:27 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: Fixed stack size?
In-Reply-To: <7p39sh$m2v$1@news.luth.se>
Message-ID: <Pine.SUN.3.91.990815135435.1935g-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 14 Aug 1999, Martin Str|mberg wrote:

> Yes, but I'm not suggesting to explicitly unmap some addresses. I'm
> trying to figure out a way to get SIGSTACK_OVERFLOW (to the
> client). It seems to me one way of doing this is to have one page
> below the stack marked as not present. When the application touches
> this page the server acts as if the page is unmapped and deliver
> SIGSTACK_OVERFLOW to the client instead of SIGSEGV.

This can only be done with CWSDPMI and 386Max, as they are the only ones 
that support the underlying DPMI call.  So it is not a general solution, 
even if you settle for SIGSEGV.

Also, are you sure the server can always know where's the stack limit?

Note that uncommitting a single page is not going to solve the problem 
entirely, since a large local variable will decrement ESP in a single 
blow, which might be much larger than 4KB.  If this happens, you don't 
catch the overflow.

- Raw text -


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