From owner-freebsd-hackers Mon Jul 29 07:09:50 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA27585 for hackers-outgoing; Mon, 29 Jul 1996 07:09:50 -0700 (PDT) Received: from relay.hp.com (relay.hp.com [15.255.152.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA27579 for ; Mon, 29 Jul 1996 07:09:47 -0700 (PDT) Received: from fakir.india.hp.com by relay.hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA249269377; Mon, 29 Jul 1996 07:09:41 -0700 Received: from localhost by fakir.india.hp.com with SMTP (1.37.109.16/15.5+ECS 3.3) id AA255919517; Mon, 29 Jul 1996 19:41:57 +0530 Message-Id: <199607291411.AA255919517@fakir.india.hp.com> To: Poul-Henning Kamp Cc: Michael Hancock , hackers@FreeBSD.ORG Subject: Re: kernel assertions In-Reply-To: Your message of "Mon, 29 Jul 1996 15:43:16 +0200." <532.838647796@critter.tfs.com> Date: Mon, 29 Jul 1996 19:41:56 +0530 From: A JOSEPH KOSHY Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >>>>>> "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