From 0a34963c38fe21eee84ebab010996317731a5171 Mon Sep 17 00:00:00 2001 From: Gordon Ross Date: Sat, 5 Feb 2022 09:45:34 -0500 Subject: 14475 Recursive death in libfakekernel assfail after 12396 Reviewed by: Toomas Soome Reviewed by: Matt Barden Approved by: Dan McDonald --- usr/src/lib/libfakekernel/common/printf.c | 9 ++++----- 1 file 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 #include #include +#include #include -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 -- cgit v1.2.3