[Lldb-commits] [PATCH] D12659: Use SI_KERNEL on platforms defining it

Kamil Rytarowski via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 4 19:36:59 PDT 2015

krytarowski created this revision.
krytarowski added a reviewer: joerg.
krytarowski added a subscriber: lldb-commits.
krytarowski set the repository for this revision to rL LLVM.
Herald added a subscriber: emaste.

Linux and FreeBSD occasionally send SI_KERNEL codes, nonexistent on other platforms.
Problem caught on NetBSD.




Index: source/Plugins/Process/POSIX/CrashReason.cpp
--- source/Plugins/Process/POSIX/CrashReason.cpp
+++ source/Plugins/Process/POSIX/CrashReason.cpp
@@ -28,11 +28,13 @@
     switch (info.si_code)
+#ifdef SI_KERNEL
     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.
         return CrashReason::eInvalidAddress; // for lack of anything better
     case SEGV_MAPERR:
         return CrashReason::eInvalidAddress;
     case SEGV_ACCERR:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12659.34099.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150905/a2dee59a/attachment-0001.bin>

More information about the lldb-commits mailing list