Front page | perl.perl5.porters |
Postings from May 2009
Re: regexp iteration limits
Thread Previous
|
Thread Next
From:
Dave Mitchell
Date:
May 3, 2009 13:11
Subject:
Re: regexp iteration limits
Message ID:
20090503201051.GC29827@iabyn.com
A quick update to this old thread:
On Tue, Feb 10, 2009 at 12:17:39AM +0000, Zefram wrote:
> I've been looking at a class of bugs in the regexp engine, wherein the
> "*" and "+" operators act like "{0,32767}" and "{1,32767}" respectively.
> I've found three different cases of it, that occur in different versions
> of perl. Back in October I reported bug #60034, originally with a test
> case that amounted to this:
>
> $ for pver in 5.{6.2,8.{0,8,9},9.4,10.0}; do echo $pver $(~/usr/perl/util/perlver $pver-i32-f52 perl -lwe '$SIG{__WARN__}=sub{print"(warn) "}; $a="xyzt"x10000; print $a =~ /\A(?>[a-z])*\z/ ? "ok" : "bug"'); done
> 5.6.2 ok
> 5.8.0 ok
> 5.8.8 ok
> 5.8.9 ok
> 5.9.4 bug
> 5.10.0 bug
Fixed in blead and maint-5.10
> $
>
> I then discovered and announced this variation on it:
>
> $ for pver in 5.{8.{0,8,9},9.4,10.0}; do echo $pver $(~/usr/perl/util/perlver $pver-i32-f52 perl -lwe '$SIG{__WARN__}=sub{print"(warn) "}; $a="xyzt"x10000; utf8::upgrade($a); print $a =~ /\A(?>[a-z])*\z/ ? "ok" : "bug"'); done
> 5.8.0 bug
> 5.8.8 bug
> 5.8.9 ok
> 5.9.4 bug
> 5.10.0 bug
Fixed in blead and maint-5.10
> As you see, a fix for this case went into 5.8.9. Did they get fixed
> in 5.10? I haven't noticed anyone announce a code patch for 5.10 or
> blead, but the bug has been closed in RT.
>
> Anyway, I'm raising the issue again because I've found the same problem
> happening in a different way:
>
> $ for pver in 5.{6.2,8.{0,8,9},9.4,10.0}; do echo $pver $(~/usr/perl/util/perlver $pver-i32-f52 perl -lwe '$SIG{__WARN__}=sub{print"(warn) "}; $a="xyzt"x10000; print $a =~ /\A(?:X?[a-z])*\z/ ? "ok" : "bug"'); done
> 5.6.2 (warn) bug
> 5.8.0 (warn) bug
> 5.8.8 (warn) bug
> 5.8.9 (warn) bug
> 5.9.4 (warn) bug
> 5.10.0 (warn) bug
Still present in blead and maint-5.10
--
Gravity is just a theory; teach Intelligent Falling in our schools!
http://www.theonion.com/content/node/39512
Thread Previous
|
Thread Next