public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/13396] New: culry is treated as a range in cases where POSIX says it should not be
@ 2011-11-09 18:54 kevin.braunsdorf at gmail dot com
  2011-11-09 18:56 ` [Bug regex/13396] curly " kevin.braunsdorf at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: kevin.braunsdorf at gmail dot com @ 2011-11-09 18:54 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=13396

             Bug #: 13396
           Summary: culry is treated as a range in cases where POSIX says
                    it should not be
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: kevin.braunsdorf@gmail.com
    Classification: Unclassified
            Target: Red Hat Enterprise Linux Server release 5.4 (Tikanga)


Created attachment 6046
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6046
C program to repeat the bug

In the RE "^[$](S|{SHELL}|k|K)$"  the curly braced are not
range specifiers.  Other versions of regcomp accept this RE
with no errors (egrep, *BSD's implmentation and others), but
the later glibc complains:

regcomp: ^[$](S|{SHELL}|k|K)$: Invalid preceding regular expression

(I include a test program for it.)

-- 
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] 6+ messages in thread

* [Bug regex/13396] curly is treated as a range in cases where POSIX says it should not be
  2011-11-09 18:54 [Bug regex/13396] New: culry is treated as a range in cases where POSIX says it should not be kevin.braunsdorf at gmail dot com
@ 2011-11-09 18:56 ` kevin.braunsdorf at gmail dot com
  2011-11-09 22:14 ` bonzini at gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kevin.braunsdorf at gmail dot com @ 2011-11-09 18:56 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=13396

ksb <kevin.braunsdorf at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|culry is treated as a range |curly is treated as a range
                   |in cases where POSIX says   |in cases where POSIX says
                   |it should not be            |it should not be

-- 
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] 6+ messages in thread

* [Bug regex/13396] curly is treated as a range in cases where POSIX says it should not be
  2011-11-09 18:54 [Bug regex/13396] New: culry is treated as a range in cases where POSIX says it should not be kevin.braunsdorf at gmail dot com
  2011-11-09 18:56 ` [Bug regex/13396] curly " kevin.braunsdorf at gmail dot com
@ 2011-11-09 22:14 ` bonzini at gnu dot org
  2011-11-10  4:44 ` bugdal at aerifal dot cx
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bonzini at gnu dot org @ 2011-11-09 22:14 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=13396

Paolo Bonzini <bonzini at gnu dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bonzini at gnu dot org
         Resolution|                            |INVALID

--- Comment #1 from Paolo Bonzini <bonzini at gnu dot org> 2011-11-09 22:13:32 UTC ---
POSIX says: "the BRE construct "\{1,2,3\}" does not comply with the grammar. A
conforming application cannot rely on it producing an error nor matching the
literal characters "\{1,2,3\}"."

-- 
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] 6+ messages in thread

* [Bug regex/13396] curly is treated as a range in cases where POSIX says it should not be
  2011-11-09 18:54 [Bug regex/13396] New: culry is treated as a range in cases where POSIX says it should not be kevin.braunsdorf at gmail dot com
  2011-11-09 18:56 ` [Bug regex/13396] curly " kevin.braunsdorf at gmail dot com
  2011-11-09 22:14 ` bonzini at gnu dot org
@ 2011-11-10  4:44 ` bugdal at aerifal dot cx
  2011-11-10  6:39 ` bonzini at gnu dot org
  2014-06-27 11:37 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: bugdal at aerifal dot cx @ 2011-11-10  4:44 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=13396

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |bugdal at aerifal dot cx
         Resolution|INVALID                     |

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> 2011-11-10 04:43:37 UTC ---
Paolo, the citation you provided is for POSIX BRE. The bug report pertains to
POSIX ERE.

-- 
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] 6+ messages in thread

* [Bug regex/13396] curly is treated as a range in cases where POSIX says it should not be
  2011-11-09 18:54 [Bug regex/13396] New: culry is treated as a range in cases where POSIX says it should not be kevin.braunsdorf at gmail dot com
                   ` (2 preceding siblings ...)
  2011-11-10  4:44 ` bugdal at aerifal dot cx
@ 2011-11-10  6:39 ` bonzini at gnu dot org
  2014-06-27 11:37 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: bonzini at gnu dot org @ 2011-11-10  6:39 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=13396

Paolo Bonzini <bonzini at gnu dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Paolo Bonzini <bonzini at gnu dot org> 2011-11-10 06:39:04 UTC ---
Here is the description of ranges for BRE:

    When a BRE matching a single character, a subexpression, or a
back-reference is followed by an interval expression of the format "\{m\}",
"\{m,\}", or "\{m,n\}", together with that interval expression it shall match
what repeated consecutive occurrences of the BRE would match. The values of m
and n are decimal integers in the range 0 <= m<= n<= {RE_DUP_MAX}, where m
specifies the exact or minimum number of occurrences and n specifies the
maximum number of occurrences. The expression "\{m\}" shall match exactly m
occurrences of the preceding BRE, "\{m,\}" shall match at least m occurrences,
and "\{m,n\}" shall match any number of occurrences between m and n, inclusive.

    For example, in the string "abababccccccd" the BRE "c\{3\}" is matched by
characters seven to nine, the BRE "\(ab\)\{4,\}" is not matched at all, and the
BRE "c\{1,3\}d" is matched by characters ten to thirteen.

---

Here is the description for ERE:

When an ERE matching a single character or an ERE enclosed in parentheses is
followed by an interval expression of the format "{m}", "{m,}", or "{m,n}",
together with that interval expression it shall match what repeated consecutive
occurrences of the ERE would match. The values of m and n are decimal integers
in the range 0 <= m<= n<= {RE_DUP_MAX}, where m specifies the exact or minimum
number of occurrences and n specifies the maximum number of occurrences. The
expression "{m}" matches exactly m occurrences of the preceding ERE, "{m,}"
matches at least m occurrences, and "{m,n}" matches any number of occurrences
between m and n, inclusive.

For example, in the string "abababccccccd" the ERE "c{3}" is matched by
characters seven to nine and the ERE "(ab){2,}" is matched by characters one to
six.

---

The two are the same except for \.  The citation I provided is just an example
not restricted to either BRE or ERE.  Thus POSIX could have said equivalently

the ERE construct "{1,2,3}" does not comply with the grammar. A
conforming application cannot rely on it producing an error nor matching the
literal characters "{1,2,3}"

and it would have applied to BRE and ERE just the same.

-- 
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] 6+ messages in thread

* [Bug regex/13396] curly is treated as a range in cases where POSIX says it should not be
  2011-11-09 18:54 [Bug regex/13396] New: culry is treated as a range in cases where POSIX says it should not be kevin.braunsdorf at gmail dot com
                   ` (3 preceding siblings ...)
  2011-11-10  6:39 ` bonzini at gnu dot org
@ 2014-06-27 11:37 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 11:37 UTC (permalink / raw)
  To: glibc-bugs-regex

https://sourceware.org/bugzilla/show_bug.cgi?id=13396

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] 6+ messages in thread

end of thread, other threads:[~2014-06-27 11:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 18:54 [Bug regex/13396] New: culry is treated as a range in cases where POSIX says it should not be kevin.braunsdorf at gmail dot com
2011-11-09 18:56 ` [Bug regex/13396] curly " kevin.braunsdorf at gmail dot com
2011-11-09 22:14 ` bonzini at gnu dot org
2011-11-10  4:44 ` bugdal at aerifal dot cx
2011-11-10  6:39 ` bonzini at gnu dot org
2014-06-27 11:37 ` 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).