summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorchs <chs@NetBSD.org>2021-12-13 01:33:32 +0000
committerchs <chs@NetBSD.org>2021-12-13 01:33:32 +0000
commit425ded96da2e5aff886d401936d243cb148a0c95 (patch)
treef74eaaa7c7b89f12877129841fafb878f4a1ef86 /sys/lib
parent0c672fb96e1264aba1c0842764ec6e9aaa9baa8a (diff)
revert rev 1.4 ("Add garbage instructions at end of kern_assert after vpanic.")
that change had no effect because vpanic() is marked __dead / noreturn and thus the compiler would optimize away everything after a call to vpanic(). the original problem has now been fixed differently (but only for x86 so far).
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libkern/kern_assert.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/lib/libkern/kern_assert.c b/sys/lib/libkern/kern_assert.c
index c31b2f2982f..7920e245b86 100644
--- a/sys/lib/libkern/kern_assert.c
+++ b/sys/lib/libkern/kern_assert.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_assert.c,v 1.4 2017/03/14 09:22:37 riastradh Exp $ */
+/* $NetBSD: kern_assert.c,v 1.5 2021/12/13 01:33:32 chs Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou
@@ -50,13 +50,4 @@ kern_assert(const char *fmt, ...)
va_start(ap, fmt);
vpanic(fmt, ap);
va_end(ap);
-
- /*
- * Force instructions at the return address of vpanic before
- * the next symbol, which otherwise the compiler may omit
- * because vpanic is marked noreturn. This prevents seeing
- * whatever random symbol came after kern_assert in the linked
- * kernel in stack traces for assertion failures.
- */
- asm volatile(".long 0");
}