Change 15268 by jhi@alpha on 2002/03/17 04:23:49
Subject: SEGV in s/// and UTF-8
From: [EMAIL PROTECTED] (Andreas J. Koenig)
Date: Tue, 12 Mar 2002 00:40:09 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/regexec.c#265 edit
.... //depot/perl/t/op/pat.t#164 edit
Differences ...
==== //depot/perl/regexec.c#265 (text) ====
Index: perl/regexec.c
--- perl/regexec.c.~1~ Sat Mar 16 21:30:05 2002
+++ perl/regexec.c Sat Mar 16 21:30:05 2002
@@ -2425,7 +2425,7 @@
sayNO_ANYOF;
if (locinput >= PL_regeol)
sayNO;
- locinput += inclasslen;
+ locinput += inclasslen ? inclasslen : 1;
nextchr = UCHARAT(locinput);
break;
}
==== //depot/perl/t/op/pat.t#164 (xtext) ====
Index: perl/t/op/pat.t
--- perl/t/op/pat.t.~1~ Sat Mar 16 21:30:05 2002
+++ perl/t/op/pat.t Sat Mar 16 21:30:05 2002
@@ -6,7 +6,7 @@
$| = 1;
-print "1..860\n";
+print "1..861\n";
BEGIN {
chdir 't' if -d 't';
@@ -2706,3 +2706,10 @@
$i++;
}
}
+
+{
+ print "# SEGV in s/// and UTF-8\n";
+ $s = "s#\x{100}" x 4;
+ $s =~ s/[^\w]/ /g;
+ print $s eq "s \x{100}" x 4 ? "ok 861\n" : "not ok 861\n";
+}
End of Patch.