public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug locale/28255] New: A locale with zero collation rules cause fnmatch, regexec, and regcomp failures. Date: Fri, 20 Aug 2021 22:05:15 +0000 [thread overview] Message-ID: <bug-28255-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=28255 Bug ID: 28255 Summary: A locale with zero collation rules cause fnmatch, regexec, and regcomp failures. Product: glibc Version: 2.35 Status: NEW Severity: normal Priority: P2 Component: locale Assignee: unassigned at sourceware dot org Reporter: carlos at redhat dot com Target Milestone: --- It should be possible to build a locale with zero collation rules. Such a locale would fall back to using strcmp and wcscmp during collation. Such a collation, one with zero collation rules, would also lack any data for _NL_COLLATE_COLLSEQMB, and _NL_COLLATE_COLLSEQWC. Any code using these tables must be gated on nrules != 0. However, as-of today, the only such locale in glibc was the builtin C locale, and even though it has 0 collation rules, it has identity tables for _NL_COLLATE_COLLSEQMB, and _NL_COLLATE_COLLSEQWC. These identity tables are used unconditionally by fnmatch, regexec, and regcomp, which means that when you don't generate them, the code does not properly handle regular expressions. The fix for this is quite extensive, and I didn't want to include it in glibc 2.34, but the fixes are present here in v4 of my C.UTF-8 patch series: https://patchwork.sourceware.org/project/glibc/patch/20210729063515.1541388-2-carlos@redhat.com/ The fix is also insufficient because statically linked applications would not have the fixes, so we must still keep the identity tables to allow static applications to continue working with the new binary locales (until we manage to make C.UTF-8 builtin). -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2021-08-20 22:05 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-20 22:05 carlos at redhat dot com [this message] 2021-09-16 20:18 ` [Bug locale/28255] " fweimer at redhat dot com 2021-12-16 22:32 ` carlos at redhat dot com 2021-12-16 22:32 ` carlos at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-28255-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).