diff options
| author | Yuri Pankov <ypankov@tintri.com> | 2020-03-18 20:45:47 +0300 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2021-10-08 10:10:56 -0400 |
| commit | 8e6f7903d5f7a53e1d6685962c900ab0f29c6b6c (patch) | |
| tree | 0dd717cc7e7be6828560a97e67c97d3af416d5d3 /usr/src/lib | |
| parent | aa693e996c2928c92cccd8a3efe91373e85a6967 (diff) | |
| download | illumos-joyent-8e6f7903d5f7a53e1d6685962c900ab0f29c6b6c.tar.gz | |
12396 zdb -A does not work after 3006
Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org>
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib')
| -rw-r--r-- | usr/src/lib/libfakekernel/common/mapfile-vers | 4 | ||||
| -rw-r--r-- | usr/src/lib/libfakekernel/common/printf.c | 30 |
2 files changed, 31 insertions, 3 deletions
diff --git a/usr/src/lib/libfakekernel/common/mapfile-vers b/usr/src/lib/libfakekernel/common/mapfile-vers index c7f3ae1d1d..d8de8b9fce 100644 --- a/usr/src/lib/libfakekernel/common/mapfile-vers +++ b/usr/src/lib/libfakekernel/common/mapfile-vers @@ -10,7 +10,7 @@ # # -# Copyright 2016 Nexenta Systems, Inc. All rights reserved. +# Copyright 2021 Tintri by DDN, Inc. All rights reserved. # Copyright 2017 RackTop Systems. # Copyright 2019 Joyent, Inc. # @@ -40,6 +40,8 @@ SYMBOL_VERSION SUNWprivate_1.1 { _curzone; aok { FLAGS = NODIRECT }; + assfail; + assfail3; boot_time; cmn_err; copyin; diff --git a/usr/src/lib/libfakekernel/common/printf.c b/usr/src/lib/libfakekernel/common/printf.c index bbf350b75e..7bee92f0ca 100644 --- a/usr/src/lib/libfakekernel/common/printf.c +++ b/usr/src/lib/libfakekernel/common/printf.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. - * Copyright 2017 Nexenta Systems, Inc. All rights reserved. + * Copyright 2021 Tintri by DDN, Inc. All rights reserved. * Copyright 2017 RackTop Systems. * Copyright (c) 2018, Joyent, Inc. */ @@ -42,7 +42,7 @@ char *volatile panicstr; va_list panicargs; char panicbuf[512]; -volatile int aok; +int aok; static const int ce_flags[CE_IGNORE] = { SL_NOTE, SL_NOTE, SL_WARN, SL_FATAL }; @@ -191,3 +191,29 @@ debug_enter(char *str) { /* Just a place for a break point. */ } + +int +assfail(const char *a, const char *f, int l) +{ + if (!aok) + panic("assertion failed: %s, file: %s, line: %d", a, f, l); + + fprintf(stderr, "ASSERTION CAUGHT: %s, file: %s, line: %d\n", a, f, l); + + return (0); +} + +void +assfail3(const char *a, uintmax_t lv, const char *op, uintmax_t rv, + const char *f, int l) +{ + if (!aok) { + panic("assertion failed: %s (0x%llx %s 0x%llx), file: %s, " + "line: %d", a, (u_longlong_t)lv, op, (u_longlong_t)rv, + f, l); + } + + fprintf(stderr, "ASSERTION CAUGHT: %s (0x%llx %s 0x%llx), file: %s, " + "line: %d\n", a, (u_longlong_t)lv, op, (u_longlong_t)rv, + f, l); +} |
