In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/929fffa4acb2dedab3293617c11903a4914d8fdf?hp=09b1cffef8cddfec3f726ac733cd648d5b6c28c6>
- Log ----------------------------------------------------------------- commit 929fffa4acb2dedab3293617c11903a4914d8fdf Author: Karl Williamson <[email protected]> Date: Sun Dec 12 11:28:20 2010 -0700 blead breaks Attribute::Constant The problem is that I confused FOLD with ANYOF_FOLD, and as a result, emitted a locale regnode, which is tainted. Any tests that required non-tainting started failing ----------------------------------------------------------------------- Summary of changes: regcomp.c | 4 ++-- t/op/taint.t | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/regcomp.c b/regcomp.c index 66cadcf..eb34b16 100644 --- a/regcomp.c +++ b/regcomp.c @@ -8955,8 +8955,8 @@ parseit: /* (A locale node can have 1 point and be folded; all the other folds * will include the fold, hence will have 2 points, so we won't get - * here with FOLD set unless it is also locale) */ - ret = reg_node(pRExC_state, (U8) (! FOLD) + * here with ANYOF_FOLD set unless it is also locale) */ + ret = reg_node(pRExC_state, (U8) (! (ANYOF_FLAGS(ret) & ANYOF_FOLD)) ? EXACT : EXACTFL ); diff --git a/t/op/taint.t b/t/op/taint.t index 0decc97..78b3d55 100644 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -17,7 +17,7 @@ use Config; use File::Spec::Functions; BEGIN { require './test.pl'; } -plan tests => 336; +plan tests => 338; $| = 1; @@ -1437,6 +1437,14 @@ end ok(tainted($^A), "tainted formline picture makes a tainted accumulator"); } +{ # Bug #80610 + "Constant(1)" =~ / ^ ([a-z_]\w*) (?: [(] (.*) [)] )? $ /xi; + my $a = $1; + my $b = $2; + ok(! tainted($a), "regex optimization of single char /[]/i doesn't taint"); + ok(! tainted($b), "regex optimization of single char /[]/i doesn't taint"); +} + # This may bomb out with the alarm signal so keep it last SKIP: { skip "No alarm()" unless $Config{d_alarm}; -- Perl5 Master Repository
