Treat DSE exceptions like DSI exceptions when generating signinfo.

Both can generate SIGSEGV, but DSEs would have put the wrong address
into the siginfo structure when the signal was delivered.

MFC after:	1 week
This commit is contained in:
Nathan Whitehorn 2018-01-25 18:09:26 +00:00
parent 5b810fe4a6
commit 3e1b393a51

View File

@ -154,7 +154,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
* Fill siginfo structure.
*/
ksi->ksi_info.si_signo = ksi->ksi_signo;
ksi->ksi_info.si_addr = (void *)((tf->exc == EXC_DSI) ?
ksi->ksi_info.si_addr =
(void *)((tf->exc == EXC_DSI || tf->exc == EXC_DSE) ?
tf->dar : tf->srr0);
#ifdef COMPAT_FREEBSD32