Change 14148 by jhi@alpha on 2002/01/09 13:00:09
Subject: Re: Weird Malformed warning in bleadperl
From: [EMAIL PROTECTED] (Andreas J. Koenig)
Date: 09 Jan 2002 11:12:37 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/regexec.c#246 edit
.... //depot/perl/t/op/pat.t#148 edit
Differences ...
==== //depot/perl/regexec.c#246 (text) ====
Index: perl/regexec.c
--- perl/regexec.c.~1~ Wed Jan 9 06:15:05 2002
+++ perl/regexec.c Wed Jan 9 06:15:05 2002
@@ -3879,7 +3879,7 @@
case SANY:
if (do_utf8) {
loceol = PL_regeol;
- while (scan < loceol) {
+ while (scan < loceol && hardcount < max) {
scan += UTF8SKIP(scan);
hardcount++;
}
==== //depot/perl/t/op/pat.t#148 (xtext) ====
Index: perl/t/op/pat.t
--- perl/t/op/pat.t.~1~ Wed Jan 9 06:15:05 2002
+++ perl/t/op/pat.t Wed Jan 9 06:15:05 2002
@@ -6,7 +6,7 @@
$| = 1;
-print "1..845\n";
+print "1..846\n";
BEGIN {
chdir 't' if -d 't';
@@ -2637,4 +2637,18 @@
}
print join("", @c) eq $s ? "ok 845\n" : "not ok 845\n";
+
+ my $t1 = "Q003\n\n\x{e4}\x{f6}\n\nQ004\n\n\x{e7}"; # test only chars < 256
+ my $r1 = "";
+ while ($t1 =~ / \G ( .+? ) \n\s+ ( .+? ) ( $ | \n\s+ ) /xgcs) {
+ $r1 .= $1 . $2;
+ }
+
+ my $t2 = $t1 . "\x{100}"; # repeat with a larger char
+ my $r2 = "";
+ while ($t2 =~ / \G ( .+? ) \n\s+ ( .+? ) ( $ | \n\s+ ) /xgcs) {
+ $r2 .= $1 . $2;
+ }
+ $r2 =~ s/\x{100}//;
+ print $r1 eq $r2 ? "ok 846\n" : "not ok 846\n";
}
End of Patch.