This is the mail archive of the glibc-bugs-regex@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regex/20095] New: parse_dup_op duplicates the tree exponentially when using repeated +


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

            Bug ID: 20095
           Summary: parse_dup_op duplicates the tree exponentially when
                    using repeated +
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
          Assignee: unassigned at sourceware dot org
          Reporter: dualbus at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

For every repeated + in an extended regex, parse_dup_op seems to duplicate the
parse tree.

dualbus@hp:~/v$ ulimit -a | grep cpu
cpu time               (seconds, -t) 1
dualbus@hp:~/v$ grep -E '.++++++++++++++++++++++++++++++++' <<< .
Killed

This seems to be special to +, since * doesn't behave that way.

My guess is that:

.+ is expanded to ..*

So

.+++ is expanded to ........*

And so on. Is this documented somewhere?

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]