From owner-freebsd-arch@FreeBSD.ORG Tue May 6 08:49:55 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 EBFCE37B401; Tue, 6 May 2003 08:49:55 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 589CA43F93; Tue, 6 May 2003 08:49:54 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h46FnrE25913; Tue, 6 May 2003 17:49:53 +0200 (MEST) Date: Tue, 6 May 2003 17:49:53 +0200 (CEST) From: Harti Brandt To: "Jacques A. Vidrine" In-Reply-To: <20030506152542.GC77708@madman.celabo.org> Message-ID: <20030506173822.A631@beagle.fokus.fraunhofer.de> References: <20030505225021.GA43345@nagual.pp.ru> <20030506095424.G838@beagle.fokus.fraunhofer.de> <20030506152542.GC77708@madman.celabo.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Andrey A. Chernov" cc: Daniel Eischen 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:49:56 -0000 On Tue, 6 May 2003, Jacques A. Vidrine wrote: JAV>On Tue, May 06, 2003 at 09:56:06AM +0200, Harti Brandt wrote: JAV>> There is no guarantee that you 'fix' the port by hiding the symbol. You JAV>> may as well break it. This depends on the function itself and on the JAV>> internal relationships in libc. You have to go through each individual JAV>> port and see what happens anyway. JAV> JAV>Please explain. I _am_ guaranteed that keeping the port from hijacking JAV>strlcpy calls in libc will not break the port. How could the port rely JAV>on the internals of libc? Well, strlcpy is not a very interesting example because it stand on its own. More interesting are examples where library functions depend on each other (malloc/free, fopen and co.) The user calls its own malloc(), the library tries to free with its own free(). The application could replace *printf() to actually redirect output... At the end the port might have its own strlcpy to track buffers it has written to for whatever reason. harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org