[ruby-core:74030] Re: [Ruby trunk Bug#12103][Rejected] ruby process hangs while executing regular expression.

From: Eric Wong <normalperson@...>
Date: 2016-02-28 03:22:00 UTC
List: ruby-core #74030
duerst@it.aoyama.ac.jp wrote:
> Status changed from Open to Rejected
> 
> I simplified this as follows:
> regex = /\(a+( ?a*)*\)/
> detail = "(aaaa aaaaaaa aaaaa aaaaaaaaa aaaaa"

Keep in mind the equivalent Perl terminates just fine:

	my $detail = "(aaaa aaaaaaa aaaaa aaaaaaaaa aaaaa";
	$detail =~ /\(a+( ?a*)*\)/;

Tested on an old perl v5.14.2 from Debian wheezy (oldstable).

So I prefer we acknowledge cases like these as bugs to at least
encourage someone to fix them.

Not a high priority for me, though, as I'm not familiar with
the inner workings of RE engines (and also know to avoid tricky REs).

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread