diff options
author | Yves Orton <demerphq@gmail.com> | 2008-11-06 10:44:13 +0000 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2008-11-06 10:44:13 +0000 |
commit | aff3edb5cf5195431c87166ebfe06c4721c5c783 (patch) | |
tree | 864155d51457fe84b41d79db4d1b513f69d35fee | |
parent | 4954abf77fcbac122d63699b1b3921b4d44d4570 (diff) | |
download | perl-aff3edb5cf5195431c87166ebfe06c4721c5c783.tar.gz |
Resolve perl #60344: Regex lookbehind failure after an (if)then|else in perl 5.10
During the de-recursivization it looks like Dave M forgot to reset the 'logical'
flag after using it, which in turn causes UNLESSM/IFTHEN when used after a LOGICAL operator to
be incorrectly intrepreted. This change resets the logical flag after each time it is stored
in ST.logical.
p4raw-id: //depot/perl@34746
-rw-r--r-- | regexec.c | 1 | ||||
-rw-r--r-- | t/op/re_tests | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -4983,6 +4983,7 @@ NULL do_ifmatch: ST.me = scan; ST.logical = logical; + logical = 0; /* execute body of (?...A) */ PUSH_YES_STATE_GOTO(IFMATCH_A, NEXTOPER(NEXTOPER(scan))); /* NOTREACHED */ diff --git a/t/op/re_tests b/t/op/re_tests index 0992b155cc..a4f1e53f6c 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -1358,3 +1358,5 @@ foo(\h)bar foo\tbar y $1 \t /^\s*i.*?o\s*$/s io\n io y - - # As reported in #59168 by Father Chrysostomos: /(.*?)a(?!(a+)b\2c)/ baaabaac y $&-$1 baa-ba +# [perl #60344] Regex lookbehind failure after an (if)then|else in perl 5.10 +/\A(?(?=db2)db2|\D+)(?<!processed)\.csv\z/xms sql_processed.csv n - - |