develooper Front page | perl.perl5.porters | Postings from July 2013

Re: [perl #119071] Misdiagnosed regex infinite recursion

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
July 29, 2013 17:22
Subject:
Re: [perl #119071] Misdiagnosed regex infinite recursion
Message ID:
20130729172210.GA3729@plum.flirble.org
On Mon, Jul 29, 2013 at 07:20:13PM +0200, demerphq wrote:
> On 29 July 2013 18:17, Philip Hazel <perlbug-followup@perl.org> wrote:

> > $ perl -e 'x =~ /(?:(a(*SKIP)b)){0}(?:(?1)|ac)/'
> > Infinite recursion in regex at -e line 1.
> >
> > As far as I can see, there is no infinite recursion here. Capturing group
> > number 1 is (a(*SKIP)b) and that does not do any recursing, so calling
> > it via (?1) is just a single recursion.
> 
> This looks to me like another example of {0} => NOTHING optimization
> not playing nicely with recursive patterns.

Yes, caused by commit 3018b823898645e44b8c37c70ac5c6302b031381

Fixed by commit 2e3a23da260a7ec5d61b81cb34c38de5e528b41d

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About