Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site iddic.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!tektronix!orca!iddic!kendalla From: kendalla@iddic.UUCP (Kendall Auel) Newsgroups: net.arch Subject: 286 Stack Overflow Detection Message-ID: <2173@iddic.UUCP> Date: Tue, 10-Sep-85 16:03:47 EDT Article-I.D.: iddic.2173 Posted: Tue Sep 10 16:03:47 1985 Date-Received: Thu, 12-Sep-85 11:43:25 EDT Reply-To: kendalla@iddic.UUCP (Kendall Auel) Organization: Tektronix, Beaverton OR Lines: 22 This is a correction/addition to my posting concerning the handling of a stack overflow condition on the Intel 80286: In order to switch stack segments in the midst of running a procedure, a couple of very strict rules must be adhered to. 1) All data on the stack may only be addressed using the "bp" register. This register will be updated by the stack overflow exception handler. 2) At no time may the stack pointer ("sp" register) or the "bp" register be saved (in memory or in another register) and be assumed to be a valid address. The main point of my original article was that a stack overflow need not be a fatal condition on the 286, as others have stated. I have presented one possible solution to the problem, and I suspect other more workable solutions exist as well. Kendall Auel Tektronix, Inc. Graphics Workstations Division (These views are my own, etc...)