32-bit signal contexts missing dar, dsisr, trap

Gary Byers gb at clozure.com
Fri Feb 21 10:16:31 EST 2003

On Wed, 19 Feb 2003, Peter Bergner wrote:

> Gary Byers wrote:
> > I have certain stack-like data structures that have write-protected guard
> > pages at their limits and use a SIGSEGV handler to detect writes to those
> > guard pages.  The handler can respond to a write to a guard page more
> > reliably if it knows that a DSI caused the SIGSEGV, if it knows that
> > the fault involved a write, and if it knows the address being written
> > to.  I suppose that it might be possible to reconstruct this information
> > by disassembling the instruction at the sigcontext's PC, but using the
> > dar, dsisr, and trap fields of the sigcontext seems far more reliable.
> How does the attacked patch work for you?  It does seem to clean the
> code up slightly and it matches better the behaviour seen on 64-bit apps.

That seems to work fine; thanks!

Gary Byers
gb at clozure.com

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc64-dev mailing list