summaryrefslogtreecommitdiff
path: root/t/cmd
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2003-04-21 14:19:50 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-04-23 19:11:01 +0000
commitcccede5366275457276b68bb148b7872098aaf29 (patch)
treedfb369913110eaa12ba8081f848043cf051b63b5 /t/cmd
parent1de32f2a8367111f29377c6ed81b538f36717dd9 (diff)
downloadperl-cccede5366275457276b68bb148b7872098aaf29.tar.gz
A new fatal error :
Subject: [PATCH] Perl_croak("Use of freed value in iteration") Message-ID: <20030421121950.GB18189@fdgroup.com> Message-ID: <20030421125433.GC18189@fdgroup.com> p4raw-id: //depot/perl@19316
Diffstat (limited to 't/cmd')
-rwxr-xr-xt/cmd/for.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/cmd/for.t b/t/cmd/for.t
index 3275c71d2a..3a4bc9b0da 100755
--- a/t/cmd/for.t
+++ b/t/cmd/for.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..12\n";
+print "1..13\n";
for ($i = 0; $i <= 10; $i++) {
$x[$i] = $i;
@@ -71,3 +71,8 @@ for ("-3" .. "0") {
$loop_count++;
}
print $loop_count == 4 ? "ok" : "not ok", " 12\n";
+
+# modifying arrays in loops is a no-no
+@a = (3,4);
+eval { @a = () for (1,2,@a) };
+print $@ =~ /Use of freed value in iteration/ ? "ok" : "not ok", " 13\n";