From owner-freebsd-current Sun Nov 3 17:10:23 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FE8037B401 for ; Sun, 3 Nov 2002 17:10:22 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3329E43E6E for ; Sun, 3 Nov 2002 17:10:20 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gray.sea.gr (patr530-b190.otenet.gr [212.205.244.198]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id gA41AD5t021733 for ; Mon, 4 Nov 2002 03:10:18 +0200 (EET) Received: from gray.sea.gr (gray [127.0.0.1]) by gray.sea.gr (8.12.6/8.12.6) with ESMTP id gA2G5hHj009206 for ; Sat, 2 Nov 2002 18:08:13 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by gray.sea.gr (8.12.6/8.12.6/Submit) id gA2Cx4Bg003023; Sat, 2 Nov 2002 14:59:04 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 2 Nov 2002 14:59:04 +0200 From: Giorgos Keramidas To: Conrad Sabatier Cc: current@freebsd.org Subject: Re: A few questions Message-ID: <20021102125904.GB2314@gray.sea.gr> References: <20021101120227.GB1778@gray.sea.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-11-02 00:39, Conrad Sabatier wrote: >On 01-Nov-2002 Giorgos Keramidas wrote: >> On 2002-10-31 18:39, Conrad Sabatier wrote: >>> And finally, is there a simple way to ensure that none of the debugging >>> code (including INVARIANTS stuff) is included during a buildworld? >> >> INVARIANTS and WITNESS are kernel-only stuff. They shouldn't affect >> your userland programs. If they do, it's probably a bug. > > I just happened to notice this: > > $ grep -r 'CFLAGS.*INVARIANTS' /usr/src > /usr/src/gnu/usr.bin/cc/Makefile.inc:#CFLAGS+= -DWANT_COMPILER_INVARIANTS > /usr/src/lib/libc_r/Makefile:CFLAGS+=-D_PTHREADS_INVARIANTS > /usr/src/lib/libpthread/Makefile:CFLAGS+=-D_PTHREADS_INVARIANTS Ah, good catch. It seems that _PTHREADS_INVARIANTS is enabled in libc_r and libpthread unconditionally. It's not related to the kernel INVARIANTS option, but looking at the under src/lib/libc_r I can see that it enables a few extra checks and panic()s here and there. Since I've been running "with" the checks for a while, and never paniced because of libc_r it's probably safe to remove. Giorgos. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message