From owner-freebsd-arch@FreeBSD.ORG Tue May 6 08:26:05 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64FB337B401 for ; Tue, 6 May 2003 08:26:05 -0700 (PDT) Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A18B43FA3 for ; Tue, 6 May 2003 08:26:04 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.nectar.cc (Postfix) with ESMTP id 0E63FCE; Tue, 6 May 2003 10:26:04 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id 9878F78C66; Tue, 6 May 2003 10:26:05 -0500 (CDT) Date: Tue, 6 May 2003 10:26:05 -0500 From: "Jacques A. Vidrine" To: Harti Brandt Message-ID: <20030506152605.GE77708@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Harti Brandt , Terry Lambert , freebsd-arch@freebsd.org References: <20030501182820.GA53641@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030506093754.B838@beagle.fokus.fraunhofer.de> <3EB7CC73.9C61C27E@mindspring.com> <20030506165850.Y601@beagle.fokus.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030506165850.Y601@beagle.fokus.fraunhofer.de> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.3i-ja.1 cc: freebsd-arch@freebsd.org Subject: Re: `Hiding' libc symbols X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2003 15:26:05 -0000 On Tue, May 06, 2003 at 05:14:28PM +0200, Harti Brandt wrote: > I have checked with the ISO-C draft I have around here. From a principal > point of view, we are allowed to disable the redefinition of C-library > functions. The question is, what does it help us and what do we loose: > > It helps us to catch one particular kind of bugs in 3rd party software, > where the software has a buggy implementation (in the context of our own > implementation) of a standard function. This also rules actually non-buggy > implementations of functions that adhere to newer standards than our own > implementations. This means that in order to actually help we have to go > through each instance of a port redefining a libc function and decide, > whether it is buggy, the same as our implementation or simply more > featureful and whether it is compatible with our implementation. > > We loose the ability to do certain well known tricks (which have worked > since C was invented), most of which help in debugging (f.e. replacing > malloc or str* for range checking) and we make the porting of several > software packages to FreeBSD actually harder. For these reasons and others, I cannot support any attempt to make it impossible for a programmer to define his/her own symbols that conflict with the [foo] Standard. Or stated more agressively, the day the FreeBSD toolchain refuses to allow me to define my own version of strlcpy _for use by my application_ is the day I find another development platform. Tools, not policy. If I can create code to override the internal libc strlcpy, too, that's just a plus. (Note we have this today even with `hidden' symbols.) Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se