Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 1996 19:41:56 +0530
From:      A JOSEPH KOSHY <koshy@india.hp.com>
To:        Poul-Henning Kamp <phk@critter.tfs.com>
Cc:        Michael Hancock <michaelh@cet.co.jp>, hackers@FreeBSD.ORG
Subject:   Re: kernel assertions 
Message-ID:  <199607291411.AA255919517@fakir.india.hp.com>
In-Reply-To: Your message of "Mon, 29 Jul 1996 15:43:16 %2B0200." <532.838647796@critter.tfs.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

>>>>>> "mh" == "Michael Hancock", "phk" == "Poul Henning-Kamp" >>>>>

mh>Any comments on introducing an assertion macro for kernel code that panics
	...
mh>could be called KASSERT or KERN_ASSERT.

phk> I like this idea.

Its been my experience that judicious use of ASSERTs goes a long way
in assuring code quality.  Even better is of course a thorough code review :-).

However, some of these checks should probably remain even in a production 
kernel since pathological situations do arise, and its better to abort than 
corrupt user data silently.

So we probably have two kinds of asserts here: one kind is thorough but
expensive (which could be removed using -DNDEBUG or whatever) and the other 
that is minimal and cheap.

Koshy



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