From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5736 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Bug report on iswalpha Date: Tue, 5 Aug 2014 17:23:18 -0400 Message-ID: <20140805212318.GN1674@brightrain.aerifal.cx> References: <20140805210238.GL1674@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1407273821 28308 80.91.229.3 (5 Aug 2014 21:23:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2014 21:23:41 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5741-gllmg-musl=m.gmane.org@lists.openwall.com Tue Aug 05 23:23:34 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XEmCh-00087n-BG for gllmg-musl@plane.gmane.org; Tue, 05 Aug 2014 23:23:31 +0200 Original-Received: (qmail 11468 invoked by uid 550); 5 Aug 2014 21:23:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11460 invoked from network); 5 Aug 2014 21:23:30 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5736 Archived-At: On Tue, Aug 05, 2014 at 02:10:25PM -0700, Alon Zakai wrote: > I see what you mean, yes, this does seem like undefined behavior then, as > it's invalid in that locale. Thanks for the quick response! Just to be clear -- given musl's current C locale, it's not UB in musl. In musl's current C locale, mbtowc() for "\xc3\xb4" produces (wchar_t)0xf4, so the behavior is well-defined and the "true" result is correct. On the other hand, the behavior is undefined for glibc. Rich