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

[perl #117917] Bug in Regex-Engine (?)

From:
Father Chrysostomos via RT
Date:
July 6, 2013 13:48
Subject:
[perl #117917] Bug in Regex-Engine (?)
Message ID:
rt-3.6.HEAD-2552-1373118500-1256.117917-15-0@perl.org
On Thu May 09 08:54:30 2013, davem wrote:
> On Thu, May 09, 2013 at 11:32:19AM +1000, Tony Cook wrote:
> > That said, blead doesn't crash (but still has an undefined
> $+{delim}).
> 
> This can be reduced to;
> 
> 'ab' =~ /^(a(?{ 'x' =~ m{x}})b)(?{ warn "inner undef!\n" unless
> defined $1 })/;
> warn "outer undef!\n" unless defined $1;
> 
> which produces:
> 
>     inner undef!
> 
> removing the match from inside the (?{}) makes the issue go away, so
> it looks
> like the regex state isn't being saved/restored properly on re-
> entrancy.
> 
> I'm looking into why.

I have beaten you to it. :-)

Fixed in f5df269.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=117917



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