]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/debug.c
xnu-3248.30.4.tar.gz
[apple/xnu.git] / osfmk / kern / debug.c
index 2c79aacdf7eeb9f012676b4b9829a6e15fdfbaf1..cd9b5bb2351216aa34952d64461bafd884bdfaf2 100644 (file)
@@ -317,7 +317,8 @@ restart:
                        nestedpanic +=1;
                        PANIC_UNLOCK();
                        Debugger("double panic");
-                       printf("double panic:  We are hanging here...\n");
+                       // a printf statement here was removed to avoid a panic-loop caused
+                       // by a panic from printf
                        panic_stop();
                        /* NOTREACHED */
                }
@@ -341,12 +342,16 @@ panic_epilogue(spl_t      s)
        panicstr = (char *)0;
        PANIC_UNLOCK();
 
+#if DEVELOPMENT || DEBUG
        if (return_on_panic) {
                panic_normal();
                enable_preemption();
                splx(s);
                return;
        }
+#else
+       (void)s;
+#endif
        kdb_printf("panic: We are hanging here...\n");
        panic_stop();
        /* NOTREACHED */