From owner-svn-src-head@FreeBSD.ORG Wed Jul 23 17:22:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD440C95; Wed, 23 Jul 2014 17:22:55 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30C9725A5; Wed, 23 Jul 2014 17:22:55 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s6NHMjrs074065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Jul 2014 20:22:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s6NHMjrs074065 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s6NHMjAc074064; Wed, 23 Jul 2014 20:22:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 23 Jul 2014 20:22:45 +0300 From: Konstantin Belousov To: "Pedro F. Giffuni" Subject: Re: svn commit: r268945 - in head: lib/libc/stdlib sys/sys Message-ID: <20140723172245.GJ93733@kib.kiev.ua> References: <201407211544.s6LFixKa093406@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bBEFi9hJwHdAKtec" Content-Disposition: inline In-Reply-To: <201407211544.s6LFixKa093406@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 17:22:55 -0000 --bBEFi9hJwHdAKtec Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2014 at 03:44:59PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Jul 21 15:44:59 2014 > New Revision: 268945 > URL: http://svnweb.freebsd.org/changeset/base/268945 >=20 > Log: > Fix hdestroy() compliance issue. > =20 > The hcreate(3) implementation and related functions we inherited > from NetBSD used to free() the key value, something that is not > supported by the standard implementation. > =20 > This would cause a segmentation fault when attempting to run > the examples from the opengroup and linux manpages. NetBSD > has added non-standard calls to provide the previous > behaviour but hdestroy is not very commonly used so at this > time it seems excessive to bring those to FreeBSD. > =20 > Bump the __FreeBSD_version as this is an ABI change. > =20 > Reference: > http://bugs.dragonflybsd.org/issues/1398 > =20 > MFC after: 2 weeks >=20 > Modified: > head/lib/libc/stdlib/hcreate.c > head/sys/sys/param.h >=20 > Modified: head/lib/libc/stdlib/hcreate.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/stdlib/hcreate.c Mon Jul 21 15:26:52 2014 (r268944) > +++ head/lib/libc/stdlib/hcreate.c Mon Jul 21 15:44:59 2014 (r268945) > @@ -159,7 +159,6 @@ hdestroy_r(struct hsearch_data *head) > while (!SLIST_EMPTY(&table[idx])) { > ie =3D SLIST_FIRST(&table[idx]); > SLIST_REMOVE_HEAD(&table[idx], link); > - free(ie->ent.key); > free(ie); > } > } >=20 > Modified: head/sys/sys/param.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/param.h Mon Jul 21 15:26:52 2014 (r268944) > +++ head/sys/sys/param.h Mon Jul 21 15:44:59 2014 (r268945) > @@ -58,7 +58,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1100027 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1100028 /* Master, propagated to newvers */ > =20 > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of Free= BSD, You broke the ABI. This is absolute stopper for the symversioned fundamental library. The right thing to do is to introduce a new version of hcreate() for FBSD_1= =2E4, and provide compat shims with the old behaviour for FBSD_1.0. --bBEFi9hJwHdAKtec Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTz+9kAAoJEJDCuSvBvK1BqFgP/1/mkMihsHfv5MLaU8jcTTdn x0T+tvMWSvnwSuGINHPaabBNjxCqUSmWtCqOOUXSGB/yWs8el93hRC5i6JoRdgPr z4RxEAtPW9F9P5ahKNIDdgBFi6WaxSlAWUJlz+mgXJMCSUcGkxANP3vW/zxcP9u3 PUG44pqv3BV7gM+0nxoqZkUEwh7a3fCzYO/jqYElonmIhpUJ+Dig1irXQ+AyDywD 6HEIMHgvobVrD7wr+Eb0y5MhVpznwGWOZzvbex7QWATt2Az7Sb72pmypDRiMG35Z AojAIOrGSQLOSv11t6rv++ksK9xEREjCHLDe+Sn6p1hnnDmn3CVWsKx8fNLF5yjp aa7P+j+3et5rgyeK9ZbD9BKZFXXGmo82f6wTFHPGNBnNHfFZtUSr1jjj8Z3hEF14 Q/hAtRZ2MTH7BYjJtCHxKYiJSgrvPvtJePX2fl9E2KSYpHY51xl4seb+OFMcn8V5 2DbQGryyiy6j/H1fQ9bVsjkgziXIQrSuTZkaVJKxCqrAG98UYLNsNaM+OSFsHjbV k8fkVCrfYj7IXRRflvXVxdallsM7rv4Hp9ZiLnolCjbQt5egx3PAfffsKe20Idei yKAOARPIHjEEwXzC+pHodwpf+SLiBExfxTS/0z3iF3DxdBMrIaoivgDGeFcC6Ggf Dh+qZhVj4h1GDabvac24 =BmN1 -----END PGP SIGNATURE----- --bBEFi9hJwHdAKtec--