summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2009-12-07 14:58:40 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-12-07 14:58:40 +0100
commit8a27a13e89107aaf68c0748b68ee71fbd86d774b (patch)
tree99c88fba6b802c9c35eedd88257497a085e8a57a /t
parent6bc991bfb3c34a5d286a1202fcc0d740d72dcee7 (diff)
downloadperl-8a27a13e89107aaf68c0748b68ee71fbd86d774b.tar.gz
[perl #71076] sort with active sub (5.10 regression)
One of the tests in sort.t causes a bus error (or sometimes ‘Undefined subroutine called’) if run multiple times. This is because sort decreases the refcount of an active sub used as a comparison routine. Ironically enough, this test was added by the very change that broke it (25953/9850bf2).
Diffstat (limited to 't')
-rw-r--r--t/op/sort.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/op/sort.t b/t/op/sort.t
index 75b9a171b3..24e171351a 100644
--- a/t/op/sort.t
+++ b/t/op/sort.t
@@ -6,7 +6,7 @@ BEGIN {
require 'test.pl';
}
use warnings;
-plan( tests => 147 );
+plan( tests => 148 );
# these shouldn't hang
{
@@ -701,8 +701,8 @@ $fail_msg = q(Can't undef active subroutine);
cmp_ok(substr($@,0,length($fail_msg)),'eq',$fail_msg,'undef active subr');
-
-{
+for(1,2) # We run this twice, to make sure sort does not lower the ref
+{ # count. See bug 71076.
my $failed = 0;
sub rec {