Set the siginfo si_addr field, and also the mysterious 3rd parameter
to old-style signals, to be the DAR register for DSI miss exceptions. This gives the address of the access rather than the instruction address. The behaviour is now the same as on i386. Found by: libsigsegv tests
This commit is contained in:
parent
691f012913
commit
713f710c8d
@ -530,10 +530,13 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
*/
|
||||
sf.sf_si = ksi->ksi_info;
|
||||
sf.sf_si.si_signo = sig;
|
||||
sf.sf_si.si_addr = (void *)tf->srr0; /* XXX */
|
||||
sf.sf_si.si_addr = (void *) ((tf->exc == EXC_DSI) ?
|
||||
tf->dar : tf->srr0);
|
||||
} else {
|
||||
/* Old FreeBSD-style arguments. */
|
||||
tf->fixreg[FIRSTARG+1] = code;
|
||||
tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ?
|
||||
tf->dar : tf->srr0;
|
||||
}
|
||||
mtx_unlock(&psp->ps_mtx);
|
||||
PROC_UNLOCK(p);
|
||||
|
@ -530,10 +530,13 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
*/
|
||||
sf.sf_si = ksi->ksi_info;
|
||||
sf.sf_si.si_signo = sig;
|
||||
sf.sf_si.si_addr = (void *)tf->srr0; /* XXX */
|
||||
sf.sf_si.si_addr = (void *) ((tf->exc == EXC_DSI) ?
|
||||
tf->dar : tf->srr0);
|
||||
} else {
|
||||
/* Old FreeBSD-style arguments. */
|
||||
tf->fixreg[FIRSTARG+1] = code;
|
||||
tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ?
|
||||
tf->dar : tf->srr0;
|
||||
}
|
||||
mtx_unlock(&psp->ps_mtx);
|
||||
PROC_UNLOCK(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user