public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/10290] New: using REG_ICASE can break ranges
@ 2009-06-17 15:47 jbastian at redhat dot com
2009-06-17 15:48 ` [Bug regex/10290] " jbastian at redhat dot com
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: jbastian at redhat dot com @ 2009-06-17 15:47 UTC (permalink / raw)
To: glibc-bugs-regex
Using a regular expression range like [C-a] works fine if compiled with
regcomp() with just the REG_EXTENDED flag, but if the REG_ICASE flag is added
too, regcomp() returns an error "Invalid range end".
Testing other ranges with REG_ICASE reveals:
[A-Z^-z] is invalid: Invalid range end (11)
[A-Z^_`a-z] is ok
[C-a] is invalid: Invalid range end (11)
[C-f] is ok
[_-a] is invalid: Invalid range end (11)
[<-a] is ok
[z-{] is ok
It appears that regcomp() is capitalizing the range if the REG_ICASE flag is
used, thus [C-a] becomes [C-A] and since A comes before C, the range is invalid.
Likewise, in locales that match ASCII, ^ becomes before z, but after Z, so
[A-Z^-z] becomes invalid, and _ comes after A but before a, so [_-a] becomes
invalid.
If this is not considered a bug, then at the very least, the regex(3) man page
should note the side-effects of using REG_ICASE.
--
Summary: using REG_ICASE can break ranges
Product: glibc
Version: 2.9
Status: NEW
Severity: normal
Priority: P2
Component: regex
AssignedTo: drepper at redhat dot com
ReportedBy: jbastian at redhat dot com
CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10290
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
2009-06-17 15:47 [Bug regex/10290] New: using REG_ICASE can break ranges jbastian at redhat dot com
@ 2009-06-17 15:48 ` jbastian at redhat dot com
2010-09-21 15:11 ` bonzini at gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: jbastian at redhat dot com @ 2009-06-17 15:48 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From jbastian at redhat dot com 2009-06-17 15:48 -------
Created an attachment (id=4004)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4004&action=view)
test case
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10290
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
2009-06-17 15:47 [Bug regex/10290] New: using REG_ICASE can break ranges jbastian at redhat dot com
2009-06-17 15:48 ` [Bug regex/10290] " jbastian at redhat dot com
@ 2010-09-21 15:11 ` bonzini at gnu dot org
2010-09-21 15:30 ` eblake at redhat dot com
2010-09-21 15:58 ` bonzini at gnu dot org
3 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2010-09-21 15:11 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From bonzini at gnu dot org 2010-09-21 15:10 -------
Note [C-a] is invalid anyway:
$ sed -n '/[C-a]/p' /dev/null
sed: -e expression #1, char 7: Invalid range end
However [c-A] is not and shows the bug:
$ sed -n '/[c-A]/p' /dev/null
$ sed -n '/[c-A]/I p'
sed: -e expression #1, char 9: Invalid range end
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10290
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
2009-06-17 15:47 [Bug regex/10290] New: using REG_ICASE can break ranges jbastian at redhat dot com
2009-06-17 15:48 ` [Bug regex/10290] " jbastian at redhat dot com
2010-09-21 15:11 ` bonzini at gnu dot org
@ 2010-09-21 15:30 ` eblake at redhat dot com
2010-09-21 15:58 ` bonzini at gnu dot org
3 siblings, 0 replies; 10+ messages in thread
From: eblake at redhat dot com @ 2010-09-21 15:30 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From eblake at redhat dot com 2010-09-21 15:30 -------
In which locale? In the POSIX locale with an ASCII (or similar) encoding, [C-a]
is well defined:
$ LC_ALL=C sed -n '/[C-a]/p' /dev/null
$ LC_ALL=en_US.UTF-8 sed -n '/[C-a]/p' /dev/null
sed: -e expression #1, char 7: Invalid range end
And since range expressions are only well-defined in the POSIX locale, the point
still remains that the case-insensitive flag is messing things up:
$ LC_ALL=C sed -n '/[C-a]/I p' /dev/null
sed: -e expression #1, char 9: Invalid range end
Also, the resolution of this bug should consider
http://sources.redhat.com/bugzilla/show_bug.cgi?id=12045, which is unrelated to
the REG_ICASE flag.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10290
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
2009-06-17 15:47 [Bug regex/10290] New: using REG_ICASE can break ranges jbastian at redhat dot com
` (2 preceding siblings ...)
2010-09-21 15:30 ` eblake at redhat dot com
@ 2010-09-21 15:58 ` bonzini at gnu dot org
3 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2010-09-21 15:58 UTC (permalink / raw)
To: glibc-bugs-regex
------- Additional Comments From bonzini at gnu dot org 2010-09-21 15:58 -------
I was using LC_ALL=en_US.UTF-8 in comment #2.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10290
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
[not found] <bug-10290-132@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2014-05-28 19:47 ` schwab at sourceware dot org
@ 2014-07-01 16:36 ` fweimer at redhat dot com
4 siblings, 0 replies; 10+ messages in thread
From: fweimer at redhat dot com @ 2014-07-01 16:36 UTC (permalink / raw)
To: glibc-bugs-regex
https://sourceware.org/bugzilla/show_bug.cgi?id=10290
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
[not found] <bug-10290-132@http.sourceware.org/bugzilla/>
2012-12-19 10:49 ` schwab@linux-m68k.org
2014-02-16 19:30 ` jackie.rosen at hushmail dot com
@ 2014-05-28 19:47 ` schwab at sourceware dot org
2014-05-28 19:47 ` schwab at sourceware dot org
2014-07-01 16:36 ` fweimer at redhat dot com
4 siblings, 0 replies; 10+ messages in thread
From: schwab at sourceware dot org @ 2014-05-28 19:47 UTC (permalink / raw)
To: glibc-bugs-regex
https://sourceware.org/bugzilla/show_bug.cgi?id=10290
Andreas Schwab <schwab at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jackie.rosen at hushmail dot com |
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
[not found] <bug-10290-132@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2014-05-28 19:47 ` schwab at sourceware dot org
@ 2014-05-28 19:47 ` schwab at sourceware dot org
2014-07-01 16:36 ` fweimer at redhat dot com
4 siblings, 0 replies; 10+ messages in thread
From: schwab at sourceware dot org @ 2014-05-28 19:47 UTC (permalink / raw)
To: glibc-bugs-regex
https://sourceware.org/bugzilla/show_bug.cgi?id=10290
Andreas Schwab <schwab at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jackie.rosen at hushmail dot com |
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
[not found] <bug-10290-132@http.sourceware.org/bugzilla/>
2012-12-19 10:49 ` schwab@linux-m68k.org
@ 2014-02-16 19:30 ` jackie.rosen at hushmail dot com
2014-05-28 19:47 ` schwab at sourceware dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 19:30 UTC (permalink / raw)
To: glibc-bugs-regex
https://sourceware.org/bugzilla/show_bug.cgi?id=10290
Jackie Rosen <jackie.rosen at hushmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jackie.rosen at hushmail dot com
--- Comment #5 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug regex/10290] using REG_ICASE can break ranges
[not found] <bug-10290-132@http.sourceware.org/bugzilla/>
@ 2012-12-19 10:49 ` schwab@linux-m68k.org
2014-02-16 19:30 ` jackie.rosen at hushmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2012-12-19 10:49 UTC (permalink / raw)
To: glibc-bugs-regex
http://sourceware.org/bugzilla/show_bug.cgi?id=10290
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|drepper.fsp at gmail dot |unassigned at sourceware
|com |dot org
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-07-01 16:36 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 15:47 [Bug regex/10290] New: using REG_ICASE can break ranges jbastian at redhat dot com
2009-06-17 15:48 ` [Bug regex/10290] " jbastian at redhat dot com
2010-09-21 15:11 ` bonzini at gnu dot org
2010-09-21 15:30 ` eblake at redhat dot com
2010-09-21 15:58 ` bonzini at gnu dot org
[not found] <bug-10290-132@http.sourceware.org/bugzilla/>
2012-12-19 10:49 ` schwab@linux-m68k.org
2014-02-16 19:30 ` jackie.rosen at hushmail dot com
2014-05-28 19:47 ` schwab at sourceware dot org
2014-05-28 19:47 ` schwab at sourceware dot org
2014-07-01 16:36 ` fweimer at redhat dot com
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).