Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys use __builtin_unreachable() after calls that panic or sw...



details:   https://anonhg.NetBSD.org/src/rev/3dd92fe53be1
branches:  trunk
changeset: 838929:3dd92fe53be1
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Feb 04 09:54:47 2019 +0000

description:
use __builtin_unreachable() after calls that panic or switch context

diffstat:

 sys/kern/kern_veriexec.c        |  5 +++--
 sys/lib/libunwind/libunwind.cxx |  2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r c413e0484714 -r 3dd92fe53be1 sys/kern/kern_veriexec.c
--- a/sys/kern/kern_veriexec.c  Mon Feb 04 09:53:41 2019 +0000
+++ b/sys/kern/kern_veriexec.c  Mon Feb 04 09:54:47 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_veriexec.c,v 1.18 2017/11/07 18:35:57 christos Exp $      */
+/*     $NetBSD: kern_veriexec.c,v 1.19 2019/02/04 09:54:47 mrg Exp $   */
 
 /*-
  * Copyright (c) 2005, 2006 Elad Efrat <elad%NetBSD.org@localhost>
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.18 2017/11/07 18:35:57 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.19 2019/02/04 09:54:47 mrg Exp $");
 
 #include "opt_veriexec.h"
 
@@ -649,6 +649,7 @@
                veriexec_file_report(vfe, "Not-evaluated status "
                    "post evaluation; inconsistency detected.", name,
                    NULL, REPORT_ALWAYS|REPORT_PANIC);
+               __builtin_unreachable();
                /* NOTREACHED */
 
        case FINGERPRINT_VALID:
diff -r c413e0484714 -r 3dd92fe53be1 sys/lib/libunwind/libunwind.cxx
--- a/sys/lib/libunwind/libunwind.cxx   Mon Feb 04 09:53:41 2019 +0000
+++ b/sys/lib/libunwind/libunwind.cxx   Mon Feb 04 09:54:47 2019 +0000
@@ -119,6 +119,7 @@
     case _URC_INSTALL_CONTEXT:
       // Transfer control to landing pad.
       cursor.jumpto();
+      __builtin_unreachable();
     default:
       // Bad personality routine.
       return _URC_FATAL_PHASE2_ERROR;
@@ -181,6 +182,7 @@
     case _URC_INSTALL_CONTEXT:
       // Transfer control to landing pad.
       cursor.jumpto();
+      __builtin_unreachable();
     default:
       // Bad personality routine.
       return _URC_FATAL_PHASE2_ERROR;



Home | Main Index | Thread Index | Old Index