From nobody Tue Sep 19 02:31:08 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RqQdT3YYzz4t9Jt for ; Tue, 19 Sep 2023 02:31:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RqQdT28y2z4HKd for ; Tue, 19 Sep 2023 02:31:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695090669; a=rsa-sha256; cv=none; b=qfc07lHpHypuJJ/G1ZKRrtucZWE2JSchuOmtuuF93sPnTch9frMa0sZ25QnIm6UwrAxU7s i1UwXPL3Di1pwwi1MEEIef7FYqT+++fZ2o55scBcewOqKpSsst+O5Zpz7msFa52aXMdXFu jHX5qwvQFeqpH1B9fKBivt5MUNltb685QyctehtFrZZcj/wsl14EAVeEA9GQwuJUnygXAB nQeurMoU9jD1Fi7cfNbS48NEkCJr2ddtQrxAjHycubz+j18dQJM86XnbZoOcSbB2cr6BJE PZpDnsqOB3cOiz4v4IRV806CSMVJZVWN/ch9Mxvvx7z4RVMvETwYxe21SKPB0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695090669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zhnEgZMAzENc6bj10O/z16lIu6WKGdRJFBcj0dCYJTw=; b=Y2o+e7wyo9X5aDKNnd1JgC1HqEjBHP3B166vDhXTR0SKdJTfZV5ilEx8SD/cWOfEFI20zN Wb1pcZOVL7Ki5p0nYXrz22JVP1DsmPq5GfR1VuvK+Bc6Np7EsjqCMGB/lATIK+oI7jEqkA 6Lq40yv8r5OSHI6pq7cr2BxOfyZSHHB3IbW7rSMESgeUx4sDnDva0Wfdd+5yFkMBty6VV5 eAWC37bMJ9N0g5sjJtOjnl7Oa/BM+ZBmLMrSW3hnPYk65glvTWuuEwoGW0x8wZBNIRX3DM mlAQV8NTSIvR11vzcviJovsNzv+ajhn8B15NWdeU7cjQeEYVcUOM+fTqVqHpIQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RqQdT1DHrzvr8 for ; Tue, 19 Sep 2023 02:31:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 38J2V9lc004224 for ; Tue, 19 Sep 2023 02:31:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38J2V9CF004223 for bugs@FreeBSD.org; Tue, 19 Sep 2023 02:31:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265950] POSIX 2008 locale failures when global locale not C Date: Tue, 19 Sep 2023 02:31:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: yuripv@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component version assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265950 Yuri Pankov changed: What |Removed |Added ---------------------------------------------------------------------------- Component|misc |bin Version|Unspecified |CURRENT Assignee|threads@FreeBSD.org |bugs@FreeBSD.org --- Comment #1 from Yuri Pankov --- This one is interesting and is actually an issue with isupper() (and other = is* functions) via __sbistype()->__sbmaskrune(). __sbmaskrune() looks like the following: static __inline int __sbmaskrune(__ct_rune_t _c, unsigned long _f) { return (_c < 0 || _c >=3D __mb_sb_limit) ? 0 : _CurrentRuneLocale->__runetype[_c] & _f; } The culprit here is __mb_sb_limit which is NOT related to thread locale and rather specifies the limit of the global locale. When global locale is set to the one with UTF-8 encoding (also true for EUC= and other encodings), __mb_sb_limit goes down to 128 (from the initial 256, whi= ch is also the limit for ISO8859-1 and other single byte locales) so we are failing the 0xC0 test early. This behavior seems to be introduced in base 367ed4e13d697ceb415183d8a7acddf5f707667c, long before the xlocale work was integrated so it wasn't really an issue back then. --=20 You are receiving this mail because: You are the assignee for the bug.=