From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A523F3858420; Thu, 16 Sep 2021 20:18:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A523F3858420 From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug locale/28255] A locale with zero collation rules cause fnmatch, regexec, and regcomp failures. Date: Thu, 16 Sep 2021 20:18:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: locale X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 2.35 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: flagtypes.name cc bug_status target_milestone resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2021 20:18:02 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28255 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |security- CC| |fweimer at redhat dot com Status|NEW |RESOLVED Target Milestone|--- |2.35 Resolution|--- |FIXED --- Comment #1 from Florian Weimer --- Fixed for glibc 2.35 via: commit f5117c6504888fab5423282a4607c552b90fd3f9 Author: Carlos O'Donell Date: Thu Jul 29 22:45:39 2021 -0400 Add 'codepoint_collation' support for LC_COLLATE. Support a new directive 'codepoint_collation' in the LC_COLLATE section of a locale source file. This new directive causes all collation rules to be dropped and instead STRCMP (strcmp or wcscmp) is used for collation of the input character set. This is required to allow for a C.UTF-8 that contains zero collation rules (minimal size) and sorts using code point sorting. To date the only implementation of a locale with zero collation rules is the C/POSIX locale. The C/POSIX locale provides identity tables for _NL_COLLATE_COLLSEQMB and _NL_COLLATE_COLLSEQWC that map to ASCII even though it has zero rules. This has lead to existing fnmatch, regexec, and regcomp implementations that require these tables. It is not correct to use these tables when nrules =3D=3D 0, but the conservative fix is to provide these tables when nrules =3D=3D 0. This assures that existing static applications using a new C.UTF-8 locale with 'codepoint_collation' at least have functional range expressions with ASCII e.g. [0-9] or [a-z]. Such static applications would not have the fixes to fnmatch, regexec and regcomp that avoid the use of the tables when nrules =3D=3D 0. Future fixes to fnmatch, regexec, and regcomp would allow range expressions to use the full set of code points for such ranges. Tested on x86_64 and i686 without regression. Reviewed-by: Florian Weimer --=20 You are receiving this mail because: You are on the CC list for the bug.=