Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching against some patterns does not terminate #16

Open
telnet23 opened this issue Jun 19, 2023 · 0 comments
Open

Matching against some patterns does not terminate #16

telnet23 opened this issue Jun 19, 2023 · 0 comments

Comments

@telnet23
Copy link

If the pattern is such that it should successfully match the empty string, then matching against the pattern in list context with the global modifier set does not terminate. For example:

my $s = "tood";
my $p = "a*";
my @m = $s =~ /$p/g;

In Perl, the above yields an array of $n + 1 empty strings, where $n is the length of $s. When using RE2, the above does not terminate and causes the machine to run out of memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant