summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-04-02 08:02:42 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-04-19 19:40:22 +0000
commit39cff0d9bacec3b7c45b12560665095ba3be16b2 (patch)
treedfbfd756019e90ca6d3f1e88a83da454b9a4b9ff /t/op
parentabc667d141be9d100fa9e0402f7809147d1f69b9 (diff)
downloadperl-39cff0d9bacec3b7c45b12560665095ba3be16b2.tar.gz
Fix bug #21347 (segfault in UNIVERSAL::AUTOLOAD with qr//)
by adding a dummy destructor method Regexp::DESTROY. This prevents infinite recursion, since Regexp::DESTROY is no more autoloaded. Subject: Re: [perl #21347] segfault in UNIVERSAL::AUTOLOAD Message-ID: <20030402020242.GA2966@ratsnest.hole> p4raw-id: //depot/perl@19277
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/ref.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/ref.t b/t/op/ref.t
index 9470efa69a..ae3eef7dbf 100755
--- a/t/op/ref.t
+++ b/t/op/ref.t
@@ -5,7 +5,7 @@ BEGIN {
@INC = qw(. ../lib);
}
-print "1..65\n";
+print "1..66\n";
require 'test.pl';
@@ -340,6 +340,12 @@ if ($result eq $expect) {
print "# expected \"$expect\", got \"$result\"\n";
}
+# bug #21347
+
+runperl(prog => 'sub UNIVERSAL::AUTOLOAD { qr// } a->p' );
+if ($? != 0) { print "not " };
+print "ok ",++$test," - UNIVERSAL::AUTOLOAD called when freeing qr//\n";
+
# test global destruction
++$test;