Date: Sun, 15 Aug 1999 13:59:27 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Str|mberg cc: djgpp AT delorie DOT com Subject: Re: Fixed stack size? In-Reply-To: <7p39sh$m2v$1@news.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.