From owner-freebsd-current@FreeBSD.ORG Sun Feb 3 16:29:26 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7817116A421 for ; Sun, 3 Feb 2008 16:29:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 1846213C458 for ; Sun, 3 Feb 2008 16:29:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JLhia-000FU4-IC; Sun, 03 Feb 2008 18:29:25 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id m13GSx3U002029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 3 Feb 2008 18:29:00 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m13GTI3Q064780; Sun, 3 Feb 2008 18:29:18 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m13GTIuX064779; Sun, 3 Feb 2008 18:29:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 3 Feb 2008 18:29:18 +0200 From: Kostik Belousov To: Peter Wemm Message-ID: <20080203162918.GK57756@deviant.kiev.zoral.com.ua> References: <861w7um5o5.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7zUmpB12F58PluDH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Scanner-Signature: ca614d1e091d53a46adb2ef7a730c6a6 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2155 [Feb 01 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {TO: local part of email appears in body} X-SpamTest-Method: none X-SpamTest-Rate: 9 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release Cc: Dag-Erling Sm?rgrav , current@freebsd.org, threads@freebsd.org Subject: Re: Symbol versioning errors in libthr X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 03 Feb 2008 16:29:26 -0000 --7zUmpB12F58PluDH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 03, 2008 at 08:59:45AM -0700, Peter Wemm wrote: > On Feb 3, 2008 8:16 AM, Dag-Erling Sm?rgrav wrote: > > Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol map: > > > > --- pthread.map 13 May 2007 14:12:39 -0000 1.18 > > +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 > > @@ -84,9 +84,13 @@ > > pthread_multi_np; > > pthread_mutex_destroy; > > pthread_mutex_getprioceiling; > > + pthread_mutex_getspinloops_np; > > + pthread_mutex_getyieldloops_np; > > pthread_mutex_init; > > pthread_mutex_lock; > > pthread_mutex_setprioceiling; > > + pthread_mutex_setspinloops_np; > > + pthread_mutex_setyieldloops_np; > > pthread_mutex_timedlock; > > pthread_mutex_trylock; > > pthread_mutex_unlock; > > > > These functions are all in FBSD_1.0, but they were introduced after the > > branch and never MFCed, so if I understand how we've implemented symbol > > versioning, they should be in FBSD_1.1. > > > > Unless someone argues credibly for keeping them in FBSD_1.0, I will move > > them to FBSD_1.1 in a few days. > > > > DES >=20 > I'm not sure I see the point in that. Consider the not-moving-to-1.1 > case. If somebody takes an 8.0 binary and runs it on 7.x, then > they'll get a 'symbol not found' error. On the other hand, if they're > moved and somebody tries the same thing, then they still get the same > kind of 'symbol not found' error but with just one character > different. Additional difference is that presence of the version itself is checked when the image is activated. This means that instead of abort in the middle of the execution since the rtld cannot find the symbol, the program gives error on the start.o AFAIR, this is original (Sun) usage of the versioning, before GNU extended it to allow individual version per symbol. I support DES to fix this in the proposed way. >=20 > The point of symbol versioning is to allow incompatible changes. eg: > to have a FBSD_1.0 version of pthread_mutex_getspinloops_np() *AND* a > FBSD_1.1 version of pthread_mutex_getspinloops_np() in the library > at the same time. The 1.0 instance would presumably be an API/ABI > conversion wrapper around the newer functions. >=20 > -Peter > --=20 > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com > "All of this is for nothing if we don't go to the stars" - JMS/B5 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --7zUmpB12F58PluDH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkel694ACgkQC3+MBN1Mb4ihzACgvnTMAc/0gjdjkhDhixTUDjeM VxMAn3qV/+cKJoKpEAjs34uWT6+ySkc6 =glaa -----END PGP SIGNATURE----- --7zUmpB12F58PluDH--