summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Ross <gwr@racktopsystems.com>2022-02-05 09:45:34 -0500
committerGordon Ross <gwr@racktopsystems.com>2022-02-15 18:46:29 -0500
commit0a34963c38fe21eee84ebab010996317731a5171 (patch)
treecca10c6188c4e9b0fa2509fdc7595b18c0a19b73
parent6ce41887bdf3c5c43465fd94dffe1b4acd302afe (diff)
downloadillumos-gate-0a34963c38fe21eee84ebab010996317731a5171.tar.gz
14475 Recursive death in libfakekernel assfail after 12396
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Matt Barden <mbarden@tintri.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/libfakekernel/common/printf.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr/src/lib/libfakekernel/common/printf.c b/usr/src/lib/libfakekernel/common/printf.c
index 7bee92f0ca..ad492cfe28 100644
--- a/usr/src/lib/libfakekernel/common/printf.c
+++ b/usr/src/lib/libfakekernel/common/printf.c
@@ -22,7 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright 2021 Tintri by DDN, Inc. All rights reserved.
- * Copyright 2017 RackTop Systems.
+ * Copyright 2022 RackTop Systems, Inc.
* Copyright (c) 2018, Joyent, Inc.
*/
@@ -32,10 +32,10 @@
#include <sys/systm.h>
#include <sys/cmn_err.h>
#include <sys/log.h>
+#include <upanic.h>
#include <fakekernel.h>
-void abort(void) __NORETURN;
void debug_enter(char *);
char *volatile panicstr;
@@ -133,12 +133,11 @@ vpanic(const char *fmt, va_list adx)
va_copy(tmpargs, adx);
fakekernel_cprintf(fmt, tmpargs, SL_FATAL, "fatal: ", "\n");
- /* Call libc`assfail() so that mdb ::status works */
(void) vsnprintf(panicbuf, sizeof (panicbuf), fmt, adx);
debug_enter(panicbuf);
- (void) assfail(panicbuf, "(panic)", 0);
- abort(); /* avoid "noreturn" warnings */
+ /* Call libc`upanic() so that mdb ::status works */
+ upanic(panicbuf, sizeof (panicbuf));
}
void