Subject: Re: Fault address in signal handler
To: Robert Swindells <rjs@fdy2.demon.co.uk>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 06/19/2002 14:51:26
In message <200206192130.g5JLUOW63742@ren.fdy2.net>Robert Swindells writes
>
>Is there a good reason why the i386 port couldn't provide the faulting
>address in the upper bits of the 'code' argument of a signal handler ?
>
>Several other ports do this when delivering SIGBUS or SIGSEGV, and it
>makes implementing complex language systems such as Lisp or Java much
>easier.

Even better, put the faulting address/insn address somewhere clean,
say in a POSIX SA_SIGINFO-style signal-handler argument; and clean up
our emulations to pass the info to an emulation-mode binary in the
same place it would expect them for `native' apps. (Maybe we already do, haven't tried since I lost access to a licensed
commerical common lisp).

At the time it was really frustrating: offering Lisp users a NetBSD
machine (better-behaved than the Linux kernels they were using),
seeing the commerically-supported Lisp run fine for demos, and then
finding that the Common Lisp broke every damn time it needed to trap a
signal to grow its heap. ```Sigh.'''