summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Rosenfeld <hans.rosenfeld@joyent.com>2018-07-12 13:01:22 +0000
committerHans Rosenfeld <hans.rosenfeld@joyent.com>2018-07-12 13:20:11 +0000
commitd638c6316f2021e055ef3b139f99aa5989c122d0 (patch)
treea6b66ae5ccbf6d3291457603d617d5f21bc31f4f
parent52b23dd769a5fb97e9d1ae1c891b7ba6e15532a1 (diff)
downloadillumos-joyent-d638c6316f2021e055ef3b139f99aa5989c122d0.tar.gz
OS-7053 dump_ttrace() chokes on softints
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Approved by: Patrick Mooney <patrick.mooney@joyent.com>
-rw-r--r--usr/src/uts/i86pc/io/apix/apix.c2
-rw-r--r--usr/src/uts/i86pc/os/trap.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/uts/i86pc/io/apix/apix.c b/usr/src/uts/i86pc/io/apix/apix.c
index a5a4823a91..33ade10c44 100644
--- a/usr/src/uts/i86pc/io/apix/apix.c
+++ b/usr/src/uts/i86pc/io/apix/apix.c
@@ -356,7 +356,7 @@ apix_get_intr_handler(int cpu, short vec)
apix_vector_t *apix_vector;
ASSERT(cpu < apic_nproc && vec < APIX_NVECTOR);
- if (cpu >= apic_nproc)
+ if (cpu >= apic_nproc || vec >= APIX_NVECTOR)
return (NULL);
apix_vector = apixs[cpu]->x_vectbl[vec];
diff --git a/usr/src/uts/i86pc/os/trap.c b/usr/src/uts/i86pc/os/trap.c
index cbb7026067..0da153355e 100644
--- a/usr/src/uts/i86pc/os/trap.c
+++ b/usr/src/uts/i86pc/os/trap.c
@@ -2080,6 +2080,7 @@ dump_ttrace(void)
#endif
/* Define format for the TYPE and VC fields */
const char fmt2[] = "%4s %3x";
+ const char fmt2s[] = "%4s %3s";
char data2[9]; /* length of string formatted by fmt2 + 1 */
/*
* Define format for the HANDLER field. Width is arbitrary, but should
@@ -2169,6 +2170,14 @@ dump_ttrace(void)
break;
case TT_INTERRUPT:
+ if (rec->ttr_regs.r_trapno == T_SOFTINT) {
+ (void) snprintf(data2, sizeof (data2),
+ fmt2s, "intr", "-");
+ (void) snprintf(data3, sizeof (data3),
+ fmt3s, "(fakesoftint)");
+ break;
+ }
+
(void) snprintf(data2, sizeof (data2), fmt2,
"intr", rec->ttr_vector);
if (get_intr_handler != NULL)