Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!sol.ctr.columbia.edu!ucselx!bionet!agate!shelby!csli!cwitty From: cwitty@csli.Stanford.EDU (Carl Witty) Newsgroups: comp.soft-sys.andrew Subject: Re: console gets bus error, other nasties -- PL 6 Message-ID: <15035@csli.Stanford.EDU> Date: 24 Aug 90 06:51:20 GMT References: <14951@csli.Stanford.EDU> Sender: cwitty@csli.Stanford.EDU (Carl Witty) Distribution: comp Organization: CSLI, Stanford University Lines: 31 In-reply-to: cwitty@csli.Stanford.EDU's message of 18 Aug 90 01:50:35 GMT In article <14951@csli.Stanford.EDU> cwitty@csli.Stanford.EDU (Carl Witty) writes: 1) "console" compiled on a Sparcstation 1 gives a bus error in a function called by the application_Start() macro on line 202 of runapp.c. It runs fine on a sun 3 or an IBM RT running AOS 4.3. (The suns both run 4.0.3). How does one go about debugging this? Normally, I'd go into a debugger and get a backtrace, to see where it died, and then look at the source code to see if I could figure out what was wrong. With this dynamic loading stuff, I can't figure out how to get the debugger to tell me what function it died in, so I can't figure out how to start debugging it. Thanks to Gary Keim for sending me information on debugging dynamically loaded programs. Unfortunately, when I attempted to recompile the offending parts with debugging information, the problem went away. His information was enough to localize the function in which the core dump occurred, though, and I used printf()'s (ugh) to find the line it was dumping core on: the problem is in the file .../andrew/atk/console/lib/vmmon.c, InitStats(), around line 61, which is: mask = sigblock(1 << (SIGCHLD - 1)); Since the problem goes away when optimization is turned off, it's probably just a compiler bug. (/bin/cc, SunOS 4.0.3c. SparcStation 1.) For now, I'll just compile that file without optimization. Carl Witty cwitty@cs.stanford.edu