Subject: Re: delivering faulted-upon address in trap frame to userland
To: Matt Thomas <matt@3am-software.com>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: port-i386
Date: 08/29/2006 13:22:38
matt@3am-software.com said:
> > that one of the registers in x86 (I think CR2) was passed as part of a
> > stack frame to signal handlers
> Look for SA_SIGINFO.

It should be noted that the code implementing this on i386 (and
probably amd64) is not quite correct -- cr2 is used at too many
places, and invalid addresses are put into the siginfo sometimes.
Unfortunately this cannot be fixed without changing the signal
delivered on certain events (GPF in particular) which is an ABI
change, strictly speaking. I'm still investigating the consequences.

best regards
Matthias