[Lldb-commits] [lldb] r247579 - Use SI_KERNEL on platforms defining it
Stephane Sezer via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 14 09:52:02 PDT 2015
Author: sas
Date: Mon Sep 14 11:51:58 2015
New Revision: 247579
URL: http://llvm.org/viewvc/llvm-project?rev=247579&view=rev
Log:
Use SI_KERNEL on platforms defining it
Summary:
Linux and FreeBSD occasionally send SI_KERNEL codes, nonexistent on other platforms.
Problem caught on NetBSD.
Reviewers: joerg, sas
Subscribers: sas, lldb-commits, emaste
Differential Revision: http://reviews.llvm.org/D12659
Change by Kamil Rytarowski <n54 at gmx.com>
Modified:
lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp
Modified: lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp?rev=247579&r1=247578&r2=247579&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp Mon Sep 14 11:51:58 2015
@@ -28,11 +28,12 @@ GetCrashReasonForSIGSEGV(const siginfo_t
switch (info.si_code)
{
+#ifdef SI_KERNEL
case SI_KERNEL:
- // Linux will occasionally send spurious SI_KERNEL codes.
- // (this is poorly documented in sigaction)
+ // Some platforms will occasionally send nonstandard spurious SI_KERNEL codes.
// One way to get this is via unaligned SIMD loads.
return CrashReason::eInvalidAddress; // for lack of anything better
+#endif
case SEGV_MAPERR:
return CrashReason::eInvalidAddress;
case SEGV_ACCERR:
More information about the lldb-commits
mailing list