Module Name: src
Committed By: chs
Date: Mon Dec 13 01:33:32 UTC 2021
Modified Files:
src/sys/lib/libkern: kern_assert.c
Log Message:
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).
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/kern_assert.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/lib/libkern/kern_assert.c
diff -u src/sys/lib/libkern/kern_assert.c:1.4 src/sys/lib/libkern/kern_assert.c:1.5
--- src/sys/lib/libkern/kern_assert.c:1.4 Tue Mar 14 09:22:37 2017
+++ src/sys/lib/libkern/kern_assert.c Mon Dec 13 01:33:32 2021
@@ -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");
}