kasserts behind invariants

Sean Bruno sean_bruno at yahoo.com
Fri Dec 13 21:53:31 UTC 2013


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?

sean



More information about the freebsd-current mailing list