From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51623 invoked by alias); 19 Jan 2017 21:17:43 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 51594 invoked by uid 89); 19 Jan 2017 21:17:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*M:467d X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jan 2017 21:17:31 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F37AF81239 for ; Thu, 19 Jan 2017 21:17:30 +0000 (UTC) Received: from [10.10.117.52] (ovpn-117-52.rdu2.redhat.com [10.10.117.52]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0JLHU81031764 for ; Thu, 19 Jan 2017 16:17:30 -0500 Subject: Re: [SECURITY] libidn - locale specific error in test suite To: cygwin-apps@cygwin.com References: <90dee62a-dc34-f83a-7094-8e0df688d801@cygwin.com> <20381568-c93e-1517-0f3d-579a5e6ac3fa@volkerzell.de> <20170109142640.GC843@calimero.vinschen.de> <86acc3c1-23ff-d76c-f7c8-c3cefcd567fa@volkerzell.de> <39d8753c-c875-0910-8ce8-5464d09b8235@redhat.com> <20170119181930.GC25162@calimero.vinschen.de> <20170119210219.GA3775@calimero.vinschen.de> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: Date: Thu, 19 Jan 2017 21:17:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170119210219.GA3775@calimero.vinschen.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ggass2duhElmipRE49OfOsLsOoUG22eeM" X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00031.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ggass2duhElmipRE49OfOsLsOoUG22eeM Content-Type: multipart/mixed; boundary="GVgg53gKt7eapVQtsDiIPSvtmlQCVTMEA"; protected-headers="v1" From: Eric Blake To: cygwin-apps@cygwin.com Message-ID: Subject: Re: [SECURITY] libidn - locale specific error in test suite References: <90dee62a-dc34-f83a-7094-8e0df688d801@cygwin.com> <20381568-c93e-1517-0f3d-579a5e6ac3fa@volkerzell.de> <20170109142640.GC843@calimero.vinschen.de> <86acc3c1-23ff-d76c-f7c8-c3cefcd567fa@volkerzell.de> <39d8753c-c875-0910-8ce8-5464d09b8235@redhat.com> <20170119181930.GC25162@calimero.vinschen.de> <20170119210219.GA3775@calimero.vinschen.de> In-Reply-To: <20170119210219.GA3775@calimero.vinschen.de> --GVgg53gKt7eapVQtsDiIPSvtmlQCVTMEA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1453 On 01/19/2017 03:02 PM, Corinna Vinschen wrote: >>>> After stepping through a debugger, it looks like this is a bug in gnul= ib >>>> and not cygwin. Gnulib is trying to test that its own function >>>> gl_locale_name() can track the use of uselocale() to set a thread-local >>>> locale that overrides the global locale. >> nl_langinfo_l(NL_LOCALE_NAME(LC_MESSAGES), locale); >> >> to recover the name of the LC_MESSAGES portion of the locale object. >> >> As Cygwin lacks that macro, there is NO way to access the locale name of >> what went into constructing a thread-local locale without peeking into >> the internal guts of the opaque locale_t object. >=20 > Question: Why is that needed outside of testcases? If you called > newlocale you know how it has been constructed. The info should be > available. I have no problems to take glibc emulating stuff, but is > there a real-world example? Yes. Consider a library-writer that wants to do something in the correct locale. Here, you have a logical separation from the main app that calls newlocale()/uselocale() and the library code that now wants to reconstruct what the current locale is. So being able to reconstruct the names of the thread-local locale via gl_locale_name() makes the library less coupled to the main app's setup. In particular, at least gettext wants to use it. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GVgg53gKt7eapVQtsDiIPSvtmlQCVTMEA-- --ggass2duhElmipRE49OfOsLsOoUG22eeM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYgSzoAAoJEKeha0olJ0NqFBYH/3OtR87OeaIUneGuk+eBtbTA +9b5QNSuAjl3uMXSNWMUJvjAmGsmGo5oWKQfXFsUU3UREiFIfXnHF9aEmX9lh7rR EHo8ZUkG1bRqr2IkuBCVgR/3bevC3riWZE0uqk0b0IOFGDS1ocanaeM5zVVQHW+r oYktoA1bJQyns2Wi6ipio5KX9mFM71YlH+F+v4/NbzScEkrAqvRk8voTGDVMZQsX tj/QQ7fBHdk0vi0/vis3i793GbamfCTPqHO+DX+h0Do+7pAACb77CzmcSE7HXu1W /V3+Xs+jnbpp9bscyy+kQ28cvuDDyUQBOi55ltB6vRT8dztuhYLIcAUflMzidQU= =dN74 -----END PGP SIGNATURE----- --ggass2duhElmipRE49OfOsLsOoUG22eeM--