public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/25814] New: Consecutive + operators accepted but have no effect except consuming more memory
@ 2020-04-12  4:06 dpmendenhall at gmail dot com
  2020-04-12 11:55 ` [Bug regex/25814] " schwab@linux-m68k.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dpmendenhall at gmail dot com @ 2020-04-12  4:06 UTC (permalink / raw)
  To: glibc-bugs-regex

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

            Bug ID: 25814
           Summary: Consecutive + operators accepted but have no effect
                    except consuming more memory
           Product: glibc
           Version: 2.27
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: regex
          Assignee: unassigned at sourceware dot org
          Reporter: dpmendenhall at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 12452
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12452&action=edit
test program

The attached test program just takes a regex pattern and a string at the
command line.

$ gcc -o regex regex.c
$ ./regex 0+ 0
pattern: 0+
string: 0

regex matched
$ ./regex 0++ 0
pattern: 0++
string: 0

regex matched
$ ./regex 0++++++++++++++++++++++++++++++++++ 0
pattern: 0++++++++++++++++++++++++++++++++++
string: 0
<hangs consuming all system memory>

I'm not even sure what consecutive + operators is supposed to mean, so I don't
know why "0++" accepts "0".

I tested this against the bionic/NetBSD regex implementation and compilation of
"0++" fails with REG_BADRPT, which makes more sense.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-15 15:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-12  4:06 [Bug regex/25814] New: Consecutive + operators accepted but have no effect except consuming more memory dpmendenhall at gmail dot com
2020-04-12 11:55 ` [Bug regex/25814] " schwab@linux-m68k.org
2020-04-12 12:15 ` schwab@linux-m68k.org
2020-04-13  2:58 ` dpmendenhall at gmail dot com
2020-04-13  2:59 ` dpmendenhall at gmail dot com
2020-04-13  3:02 ` dpmendenhall at gmail dot com
2020-04-13 11:05 ` schwab@linux-m68k.org
2020-04-13 15:35 ` dpmendenhall at gmail dot com
2020-04-15 15:53 ` dpmendenhall at gmail 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).