Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!newsxfer.itd.umich.edu!newsxfer3.itd.umich.edu!howland.erols.net!blackbush.xlink.net!ka.sub.net!gummo.bbb.sub.org!gummo.bbb.sub.org!not-for-mail From: bertram@gummo.bbb.sub.org (Bertram Barth) Newsgroups: comp.unix.bsd.netbsd.misc Subject: Re: faulting address in signal handler Date: 25 Jan 1997 06:49:16 +0100 Organization: private site in Bruchsal, Germany Lines: 46 Message-ID: <5cc6ss$nm7@gummo.bbb.sub.org> References: <5bqspu$dnn@gummo.bbb.sub.org> <5c07vu$63c@innocence.interface-business.de> NNTP-Posting-Host: gummo.bbb.sub.org Xref: euryale.cc.adfa.oz.au comp.unix.bsd.netbsd.misc:5238 In article <5c07vu$63c@innocence.interface-business.de>, J Wunsch <joerg_wunsch@interface-business.de> wrote: >bertram@gummo.bbb.sub.org (Bertram Barth) wrote: > >> I'm trying to compile yooda-1.2 (OODBMS) for NetBSD-1.2/i386. >> Within an signal-handler for SIGSEGV and SIGBUS I need to find >> the faulting address but I can't find it. >> >> How can I access the faulting address within this signal-handler? > >This is fairly system-dependant. If your kernel pushes that >information on the signal stack, you could fetch it there. Nicely put. ;-) It seems that NetBSD-1.2/i386 doesn't push this information on the stack. (I've tried different ways to find this faulting address but none of them worked.) But there exists a patch for NetBSD (I think I found it in the mailing- list archive in tech-kern.0022) which fixes this problem and which never got committed into the official source tree (AFAIK). After applying this patch I could access this address and I got this partial problem with yooda solved. So far I have not expirienced any bad side-effects from the patched kernel. BTW: I can't understand why this patch (or something else addressing this problem) was never commited to the NetBSD source-tree. OODBMS and other persistent systems (at least yooda and texas) rely heavily on this feature... >The following crock seems to work on my FreeBSD system. YMMV. Note >that it contains several DONTs: it makes an assumption about the >parameters on the signal stack which doesn't need to be valid (hidden >in the obscure cast to struct sigframe *), and it performs stdio >actions inside the signal handler. Didn't work in my environment, neither with unpatched nor with patched kernel... Ciao, bertram -- home: bertram@gummo.bbb.sub.org work: bertram@ifib.uni-karlsruhe.de - Never ascribe to malice what can be adequately described by stupidity -