Always send a SIGSEGV on a map failure. Use the code to tell the reason

for the signal.

Sponsored by:	ABT Systems Ltd
This commit is contained in:
Andrew Turner 2015-07-11 16:02:06 +00:00
parent 871ef8b0d8
commit 70915d1289

View File

@ -542,8 +542,8 @@ abort_handler(struct trapframe *tf, int prefetch)
return;
}
ksig.sig = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV;
ksig.code = 0;
ksig.sig = SIGSEGV;
ksig.code = (rv == KERN_PROTECTION_FAILURE) ? SEGV_ACCERR : SEGV_MAPERR;
ksig.addr = far;
do_trapsignal: