From owner-freebsd-current@FreeBSD.ORG Tue May 20 14:02:29 2003 Return-Path: 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 1756F37B401 for ; Tue, 20 May 2003 14:02:29 -0700 (PDT) Received: from mail.speakeasy.net (mail13.speakeasy.net [216.254.0.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DE8543FCB for ; Tue, 20 May 2003 14:02:27 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 17132 invoked from network); 20 May 2003 20:37:21 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 20 May 2003 20:37:21 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h4KKbJp0055354; Tue, 20 May 2003 16:37:19 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Tue, 20 May 2003 16:37:31 -0400 (EDT) From: John Baldwin To: Robert Watson cc: re@FreeBSD.org cc: current@FreeBSD.org Subject: Re: 5.1-RELEASE TODO X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2003 21:02:29 -0000 On 19-May-2003 Robert Watson wrote: > > On Mon, 19 May 2003, Terry Lambert wrote: > >> Robert Watson wrote: >> > |-------------------+-------------+---------------+----------------------| >> > | | | | Update the run-time | >> > | rtld-elf | -- | Alexander | link editor (rtld) | >> > | thread-safety | | Kabaev | thread-safe with | >> > | | | | libpthread. | >> > |-------------------+-------------+---------------+----------------------| >> >> According to chapter 12 of the "Go Solo 2" book, this is a bogus thing >> to do. Callers are required to take a critical section over the calls >> to the dl* functions because the dlerror() function uses a static buffer >> that can be overwritten in a multi-threaded environment. > > Sadly, that insight doesn't seem to have influenced the development > practices of a number of major application vendors :-(. As Peter has mentioned before, simply locking calls to dlopen() in the application is not sufficient since every time you have to resolve a symbol when doing a call to a function for the first time, you hit the same data structures and need the locks in those cases as well. Assuming I recalled all that correctly. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/