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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

tromey at sourceware dot org
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.
Reply | Threaded
Open this post in threaded view
|

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

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

Eduardo Bustamante <dualbus at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dualbus at gmail dot com

--- Comment #1 from Eduardo Bustamante <dualbus at gmail dot com> ---
This seems to be related to bug 17150

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