diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-04-02 08:02:42 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-04-19 19:40:22 +0000 |
commit | 39cff0d9bacec3b7c45b12560665095ba3be16b2 (patch) | |
tree | dfbfd756019e90ca6d3f1e88a83da454b9a4b9ff /t/op/ref.t | |
parent | abc667d141be9d100fa9e0402f7809147d1f69b9 (diff) | |
download | perl-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/ref.t')
-rwxr-xr-x | t/op/ref.t | 8 |
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; |