Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libkern revert rev 1.4 ("Add garbage instructions at...
details: https://anonhg.NetBSD.org/src/rev/8b34874259af
branches: trunk
changeset: 1027604:8b34874259af
user: chs <chs%NetBSD.org@localhost>
date: Mon Dec 13 01:33:32 2021 +0000
description:
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:
sys/lib/libkern/kern_assert.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diffs (23 lines):
diff -r e0fe801c7259 -r 8b34874259af sys/lib/libkern/kern_assert.c
--- a/sys/lib/libkern/kern_assert.c Mon Dec 13 01:25:29 2021 +0000
+++ b/sys/lib/libkern/kern_assert.c Mon Dec 13 01:33:32 2021 +0000
@@ -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 @@
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");
}
Home |
Main Index |
Thread Index |
Old Index