home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!news.Hamburg.Germany.EU.net!abqhh!keihh!kt
- From: kt@keihh.hanse.de (Kei Thomsen)
- Newsgroups: comp.os.os9
- Subject: Re: Strange problem with setjmp()/longjmp() in OS9
- Message-ID: <v1O85FG@keihh.hanse.de>
- Date: 2 Sep 92 05:33:38 GMT
- References: <87473@netnews.upenn.edu>
- Lines: 54
-
- In article <87473@netnews.upenn.edu> mark@ginger.biophys.upenn.edu (Mark Elliott) writes:
-
-
- > I am programming in OS-9 v2.3 and cannot get setjmp()/longjmp() to
- >behave. I would like my signal handling routine to call longjmp() to branch
- >to a location in my main() routine as set by setjmp(). The branch occurs, but
- >shortly there after I get a Bus Trap error. The curious thing is that the
- >Bus Trap error occurs a different places in the code, even in subroutines
- >that have been successfully executed several times since the branch.
- > I know that this sounds like a pure programming error in my code (it
- >probably is!) but I have made every attempt to figure it out. My question is:
-
- >********************************************************************************
- >Does any one out there know about some known problem/bug with setjmp()/longjmp()?
- >********************************************************************************
-
- Yes, I have the same. I had analysed that problem.
-
- If the program get a signal, the execption-function is called. If you leave that
- function, the OS-9 will make an OS9 F$RTE . But if you jump to another function
- with longjmp(), sometimes you get a BusError.
- Suddenly the register A5 is $7fffffff and you get a Address- oder BusError.
- If you look at the stack at that moment, you see that anybody has saved the CPU and
- FPU registers to your programstack. This could only be the kernel.
- I've tried this with all Kernels from v2.2 v2.3 and all v2.4 up till Rev. 125.
- I get that Error very fast, if I start a program with very much Floatingpointoperations
- in the background with the same priotity. With my testprogram, I can reproduce that
- error so often you want.
-
- This MUST be a Kernelbug.
-
- > I have used setjmp()/longjmp() successfully in small test programs, but
- >something is different in my large application. And I am aware of the constraints
- >required to use setjmp()/longjmp() (i.e. I have NOT called setjmp() in a
- >subroutine which was returned from before longjmp() executed).
-
- OK, I have the same.
-
- Hi Microware, if you get this news, please send my a Mail.
-
- Tschuess, Kei
- /\
- |^^|
- |{}|
- _______________/~~\________________
- / Kei Thomsen | | keihh.hanse.de \
- `========--------. .---------========'
- ||||
- Wildermuthring 90 || kt@keihh.hanse.de
- 2000 Hamburg 62 || OS-9 68030
- Voice 040/5205921 ||
- Modem 040/5200428 || 300-14400 Baud
- ,---||---, (V32bis)
- '---<>---'
-