Handle SI_KERNEL signal code for SIGSEGV exceptions.

Patch by Richard Mitton.

llvm-svn: 188075
This commit is contained in:
Matt Kopec 2013-08-09 15:26:56 +00:00
parent df03449a0a
commit f8cfe6b73a
1 changed files with 6 additions and 0 deletions

View File

@ -1788,6 +1788,12 @@ ProcessMonitor::GetCrashReasonForSIGSEGV(const siginfo_t *info)
default:
assert(false && "unexpected si_code for SIGSEGV");
break;
case SI_KERNEL:
// Linux will occasionally send spurious SI_KERNEL codes.
// (this is poorly documented in sigaction)
// One way to get this is via unaligned SIMD loads.
reason = ProcessMessage::eInvalidAddress; // for lack of anything better
break;
case SEGV_MAPERR:
reason = ProcessMessage::eInvalidAddress;
break;