Closed p5pRT closed 20 years ago
t/op/closure.t fails here. The reports from harness and t/op/closure.t -debug are attached. No analysis (yet).
op/closure..........panic: pad_alloc at - line 39. FAILED tests 143-152 Failed 10/170 tests\, 94.12% okay Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------------------------- op/closure.t 170 10 5.88% 143-152 Failed 1/1 test scripts\, 0.00% okay. 10/170 subtests failed\, 94.12% okay.
------------------------------
panic: pad_alloc at - line 46.
1: # This is a test script built by t/op/closure.t
2:
3: # inner_type: anon
4: # where_declared: in_anon
5: # within: foreach
6: # nc_attempt: 0
7: # call_inner: 0
8: # call_outer: 1
9: # undef_outer: 0
10:
11: BEGIN { $SIG{__WARN__} = sub {
12: my $msg = $_[0];
13: print "not ok: got unexpected warning $msg\n";
14: } }
15:
16: {
17: my $test = 143;
18: sub test (&) {
19: my $result = &{$_[0]};
20: print "not " unless $result;
21: print "ok $test\n";
22: $test++;
23: }
24: }
25:
26: # some of the variables which the closure will access
27: $global_scalar = 1000;
28: @global_array = (2000\, 2100\, 2200\, 2300);
29: %global_hash = 3000..3009;
30:
31: my $fs_scalar = 4000;
32: my @fs_array = (5000\, 5100\, 5200\, 5300);
33: my %fs_hash = 6000..6009;
34:
35: $outer = sub {
36: my $sub_scalar = 7000;
37: my @sub_array = (8000\, 8100\, 8200\, 8300);
38: my %sub_hash = 9000..9009;
39:
40: my $foreach = 12000;
41: my @list = (10000\, 10010);
42: foreach $foreach (@list) {
43: $anon_143 = sub { ++$global_scalar };
44: $anon_144 = sub { ++$global_array[1] };
45: $anon_145 = sub { ++$global_hash{3002} };
46: $anon_146 = sub { ++$fs_scalar };
47: $anon_147 = sub { ++$fs_array[1] };
48: $anon_148 = sub { ++$fs_hash{6002} };
49: $anon_149 = sub { ++$foreach };
50: $anon_150 = sub { ++$sub_scalar };
51: $anon_151 = sub { ++$sub_array[1] };
52: $anon_152 = sub { ++$sub_hash{9002} };
53: }
54:
55: };
56:
57: &$outer;
58:
59: test { &$anon_143 == 1001 };
60: test { &$anon_144 == 2101 };
61: test { &$anon_145 == 3004 };
62: test { &$anon_146 == 4001 };
63: test { &$anon_147 == 5101 };
64: test { &$anon_148 == 6004 };
65: test { &$anon_149 == 10011 };
66: test { &$anon_150 == 7001 };
67: test { &$anon_151 == 8101 };
68: test { &$anon_152 == 9004 };
not ok: exited with error code FF00
------------------------------
Migrated from rt.perl.org#2070 (status was 'resolved')
Searchable as RT2070$