Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/23/84; site ucbcad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!ucbvax!ucbcad!faustus From: faustus@ucbcad.UUCP (Wayne A. Christopher) Newsgroups: net.unix-wizards Subject: Re: Bug iwith setjmp/longjmp on Vax Message-ID: <25@ucbcad.UUCP> Date: Sun, 9-Jun-85 04:14:47 EDT Article-I.D.: ucbcad.25 Posted: Sun Jun 9 04:14:47 1985 Date-Received: Wed, 12-Jun-85 02:36:07 EDT References: <44700008@gypsy.UUCP> Organization: UC Berkeley CAD Group, Berkeley, CA Lines: 18 > main(){ > foo(); > longjmp(env, 1); > } > > foo(){ > > mode = setjmp(env); > if (mode != 0) magic(); > } I think the problem is that you can only longjmp back to somewhere below where you are on the stack. It resets things like the stack and argument pointers, and if you have already returned from the routine where you did the setjmp, you will have problems... I don't know exactly how this would work, but this is certainly not an intended use of longjmp... Wayne