Change 34396 by [EMAIL PROTECTED] on 2008/09/22 13:52:27

        Revert change 30638, as it introduces subtle bugs in 5.8.x. It was:
        
        Integrate:
        [ 28417]
        Subject: [PATCH]: fix: [perl #39583] Pattern Match fails for specific 
length string
        From: demerphq <[EMAIL PROTECTED]>
        Date: Fri, 23 Jun 2006 11:54:19 +0200
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28462]
        
        From: demerphq <[EMAIL PROTECTED]>
        Date: Sun, 2 Jul 2006 15:13:20 +0200
        Subject: Re: [PATCH]: fix: [perl #39583] Pattern Match fails for 
specific length string
        Message-ID: <[EMAIL PROTECTED]>
        
        add test for patch #28417

Affected files ...

... //depot/maint-5.8/perl/regexec.c#104 edit
... //depot/maint-5.8/perl/t/op/pat.t#54 edit

Differences ...

==== //depot/maint-5.8/perl/regexec.c#104 (text) ====
Index: perl/regexec.c
--- perl/regexec.c#103~33418~   2008-03-03 10:03:36.000000000 -0800
+++ perl/regexec.c      2008-09-22 06:52:27.000000000 -0700
@@ -3516,9 +3516,8 @@
                                sayNO;
                        }
                        /* PL_reginput == locinput now */
-                       PL_reginput = locinput; /* Could be reset... */
                        TRYPAREN(paren, ln, locinput);
-
+                       PL_reginput = locinput; /* Could be reset... */
                        REGCP_UNWIND(lastcp);
                        /* Couldn't or didn't -- move forward. */
                        old = locinput;

==== //depot/maint-5.8/perl/t/op/pat.t#54 (xtext) ====
Index: perl/t/op/pat.t
--- perl/t/op/pat.t#53~33926~   2008-05-25 14:12:26.000000000 -0700
+++ perl/t/op/pat.t     2008-09-22 06:52:27.000000000 -0700
@@ -3533,31 +3533,6 @@
     ok($s eq "\x{ffff}", "U+FFFF, NBOUND");
 } # non-characters end
 
-{
-    # https://rt.perl.org/rt3/Ticket/Display.html?id=39583
-    
-    # The printing characters
-    my @chars = ("A".."Z");
-    my $delim = ",";
-    my $size = 32771 - 4;
-    my $test = '';
-
-    # create some random junk. Inefficient, but it works.
-    for ($i = 0 ; $i < $size ; $i++) {
-        $test .= $chars[int(rand(@chars))];
-    }
-
-    $test .= ($delim x 4);
-    my $res;
-    my $matched;
-    if ($test =~ s/^(.*?)${delim}{4}//s) {
-        $res = $1;
-        $matched=1;
-    } 
-    ok($matched,'pattern matches');
-    ok(length($test)==0,"Empty string");
-    ok(defined($res) && length($res)==$size,"\$1 is correct size");
-}
 
 { # related to [perl #27940]
     ok("\0-A"  =~ /[EMAIL PROTECTED]/, '@- should not be interpolated in a 
pattern');
@@ -3885,4 +3860,4 @@
 
 # Put new tests above the dotted line about a page above this comment
 
-BEGIN{print "1..1276\n"};
+BEGIN{print "1..1273\n"};
End of Patch.

Reply via email to