Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2004 14:25:45 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        Jun Kuriyama <kuriyama@imgsrc.co.jp>
Subject:   Re: cvs commit: src/sys/alpha/alpha support.s src/sys/i386/i386 swtch.s src/sys/kern kern_shutdown.c src/sys/sys systm.h
Message-ID:  <20040221141407.A7632@gamplex.bde.org>
In-Reply-To: <20040220195926.GA20936@ns1.xcllnt.net>
References:  <200401192127.i0JLRBL3041817@repoman.freebsd.org> <200402180839.09285.jhb@FreeBSD.org> <20040218174059.GC7878@ns1.xcllnt.net> <200402181414.01381.jhb@FreeBSD.org> <20040220191831.B4626@gamplex.bde.org> <20040220195926.GA20936@ns1.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 20 Feb 2004, Marcel Moolenaar wrote:

> On Fri, Feb 20, 2004 at 07:32:09PM +1100, Bruce Evans wrote:

> > MPASS() has the same problems as line numbers in panic messages (except
> > for the implementation bugs (misformatting of the output etc.)): verbose
> > messages and breakage of simple regression tests.
>
> Note that however you look at it, failed assertions and panics are
> expected to not happen. I hope at least that we're not designing
> the kernel based on the frequent occurrence of these. In case they
> do happen, I expect that they help in identifying the root cause.

Yes, they shouldn't get in the way of normal things.

> If a failed assertion or a panic breaks a simple regression test, it
> means there's a bug and that it needs to be found and fixed. You're
> not supposed to complain that the message printed by the assert or
> panic logic messes up the testing.

It doesn't mean that.  E.g., the following sources produce different object
files if panic() adds line numbers:

%%%
#include <sys/param.h>
#include <sys/systm.h>
void foo(void) { panic(""); }
%%%

%%%
#include <sys/param.h>
#include <sys/systm.h>

void foo(void) { panic(""); }
%%%

so cleanups that should have no effect on the gnerated code mostly do
affect the generated code.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040221141407.A7632>