Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Dec 2013 11:36:09 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org, sbruno@freebsd.org
Subject:   Re: kasserts behind invariants
Message-ID:  <201312231136.09487.jhb@freebsd.org>
In-Reply-To: <1386971425.37172.9.camel@powernoodle.corp.yahoo.com>
References:  <1386971425.37172.9.camel@powernoodle.corp.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, December 13, 2013 4:50:25 pm Sean Bruno wrote:
> I guess this may have been argued before, but I don't see why we would
> want to hide specific things like:  sys/kern/subr_lock.c
> 
> /* Check for double-init and zero object. */
> KASSERT(!lock_initalized(lock), ("lock \"%s\" %p already initialized",
>         name, lock));
> 
> If I hadn't completely missed the fact that I had INVARIANTS activated,
> I'd never have found out why this vendor driver was being so completely
> stupid and crashing my machine.
> 
> If I find things like this that I want old KASSERT behavior on (panic if
> true) and I don't want to run INVARIANTS, is that possible?

KASSERT has never been enabled sans INVARIANTS.

-- 
John Baldwin



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