Date: Wed, 1 Nov 2000 10:45:34 +0600 (ALMT) From: Boris Popov <bp@butya.kz> To: Eivind Eklund <eivind@FreeBSD.org> Cc: current@FreeBSD.org Subject: Re: INVARIANTS and -current Message-ID: <Pine.BSF.4.10.10011011035110.22068-100000@lion.butya.kz> In-Reply-To: <20001031175851.A75483@warning.follo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 31 Oct 2000, Eivind Eklund wrote:
> I want to enable INVARIANTS by default in -current. This result in some
> slowdown, but it also makes it more likely that we'll find bugs quickly.
> People that want to run -current should know enough to disable it if it is
> in the way, anyway.
>
> Well-reasoned objections welcome.
Yes, running kernel with INVARIANTS is a very good idea (in fact,
my -current setup runs it for over a year now). But this option will
produce inconsistent data structures in the kernel and modules (just like
with SMP case). While it is recommended to avoid modules on -current - I'm
don't agree with this statement because many people use them.
In any way, fix for this is very simple (it assumes that
INVARIANTS defined somewhere in the make.conf or sys.mk):
Index: conf/kmod.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
retrieving revision 1.83
diff -u -r1.83 kmod.mk
--- conf/kmod.mk 2000/09/05 22:37:46 1.83
+++ conf/kmod.mk 2000/09/30 05:55:55
@@ -90,6 +90,10 @@
CFLAGS+= ${COPTS} -D_KERNEL ${CWARNFLAGS}
CFLAGS+= -DKLD_MODULE
+.if defined(INVARIANTS)
+CFLAGS+= -DINVARIANTS
+.endif
+
# Don't use any standard or source-relative include directories.
# Since -nostdinc will annull any previous -I paths, we repeat all
# such paths after -nostdinc. It doesn't seem to be possible to
--
Boris Popov
http://www.butya.kz/~bp/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10011011035110.22068-100000>
