From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout2.vodafonemail.de (smtpout2.vodafonemail.de [145.253.239.133]) by sourceware.org (Postfix) with ESMTPS id EEC17385381D for ; Mon, 17 May 2021 17:07:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EEC17385381D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nexgo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Stromeko@nexgo.de Received: from smtp.vodafone.de (smtpa04.fra-mediabeam.com [10.2.0.35]) by smtpout2.vodafonemail.de (Postfix) with ESMTP id A6BBE120D3B for ; Mon, 17 May 2021 19:07:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexgo.de; s=vfde-smtpout-mb-15sep; t=1621271264; bh=ieELTMRvIHj5XLFH1DIlSEDSTQ4mgXmh4BDPcgJ57+s=; h=From:To:Subject:References:Date:In-Reply-To; b=WT/hr9LyT0OmsTsRvjXOUZKjGeXRubUxs86fvVHnuXnkuKw/qcstQd7k6LSTT+vk4 2kL6bqZTcbCqi/GDA5Uj0g9YINRUwHXlf6o6BUU1N0Rd3GezlqwVB2TDfSK7PdiRyf KyxJfpHLFnqTS4D/SfMMWE7AcSnWE4LbaB11MfUw= Received: from Gertrud (p54a0c8c7.dip0.t-ipconnect.de [84.160.200.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 187751401AA for ; Mon, 17 May 2021 17:07:44 +0000 (UTC) From: Achim Gratz To: cygwin@cygwin.com Subject: Re: locale bug? References: <062101d74b26$85d13600$9173a200$@pdinc.us> Date: Mon, 17 May 2021 19:07:38 +0200 In-Reply-To: <062101d74b26$85d13600$9173a200$@pdinc.us> (Jason Pyeron's message of "Mon, 17 May 2021 10:11:25 -0400") Message-ID: <87cztpxp9h.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 1345 X-purgate-ID: 155817::1621271264-00000699-9BA206BC/0/0 X-Spam-Status: No, score=-3032.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2021 17:07:48 -0000 Jason Pyeron writes: > While working an updated build of pdfgrep, I ran in to a crash when > the environment local was something other than LC_ALL=3DC. > > Looking at http://www.cplusplus.com/reference/locale/locale/locale/ > the empty string passed to the constructor should use the > environment's default locale and if the =E2=80=9Cargument=E2=80=9D does n= ot represent > a valid C-locale in the implementation, runtime_error is thrown. It looks like the C++ standard library goes through all the right motions, but then fails to construct an actual locale object as it's supposed to do and thus errors out. Cygwin is not glibc based, so this seems to be essentially the same bug as described here: https://stackoverflow.com/questions/58245286/why-does-stdlocale-name-give-d= ifferent-results-on-clang-and-gcc and elsewhere. This bug is at least 17 years old by now, so if anybody comes up with a patch that would be helpful. It's entirely possible that the configury failed to detect (if it even tried) that Cygwin has (or should have) thread-safe locale API by now, but it might have a different API than glibc. Regards, Achim. --=20 +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves