Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!ames!sun-barr!newstop!texsun!texbell!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.forth Subject: Re: setjmp/longjmp Message-ID: <7HG4Q9B@xds13.ferranti.com> Date: 5 Jul 90 15:10:46 GMT References: <9007040422.AA28752@ucbvax.Berkeley.EDU> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 13 In article <9007040422.AA28752@ucbvax.Berkeley.EDU> wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV writes: > than what you have to do to implement > CATCH/THROW in terms of setjmp/longjmp (with is to maintain a separate > stack of jmp_bufs, and to add code to pop that stack when the dynamic > scope of a particular setjmp has expired). Nonsense. You can push the jmp_buf on the return stack. > If a routine which has called setjmp exits without cleaning up after > itself (i.e. popping this additional jmp_buf stack), a longjmp can > "jump to outer space". Which solves this problem quite nicely. -- Peter da Silva. `-_-' +1 713 274 5180.