Change 19849 by [EMAIL PROTECTED] on 2003/06/24 17:32:37

        Subject: [PATCH] Re: [perl #22719] ISA cache problem with blessed stash objects
        From: Dave Mitchell <[EMAIL PROTECTED]>
        Date: Tue, 24 Jun 2003 13:16:18 +0100
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/sv.c#671 edit
... //depot/perl/t/op/ref.t#20 edit

Differences ...

==== //depot/perl/sv.c#671 (text) ====
Index: perl/sv.c
--- perl/sv.c#670~19831~        Fri Jun 20 00:31:11 2003
+++ perl/sv.c   Tue Jun 24 10:32:37 2003
@@ -3673,7 +3673,7 @@
        if (dtype < SVt_RV)
            sv_upgrade(dstr, SVt_RV);
        else if (dtype == SVt_PVGV &&
-                SvTYPE(SvRV(sstr)) == SVt_PVGV) {
+                SvROK(sstr) && SvTYPE(SvRV(sstr)) == SVt_PVGV) {
            sstr = SvRV(sstr);
            if (sstr == dstr) {
                if (GvIMPORTED(dstr) != GVf_IMPORTED

==== //depot/perl/t/op/ref.t#20 (xtext) ====
Index: perl/t/op/ref.t
--- perl/t/op/ref.t#19~19729~   Mon Jun  9 12:13:16 2003
+++ perl/t/op/ref.t     Tue Jun 24 10:32:37 2003
@@ -5,7 +5,7 @@
     @INC = qw(. ../lib);
 }
 
-print "1..67\n";
+print "1..68\n";
 
 require 'test.pl';
 
@@ -349,6 +349,14 @@
 runperl(prog => 'sub UNIVERSAL::DESTROY { warn } bless \$a, A', stderr => 1);
 if ($? != 0) { print "not " };
 print "ok ",++$test," - warn called inside UNIVERSAL::DESTROY\n";
+
+
+# bug #22719
+
+runperl(prog => 'sub f { my $x = shift; *z = $x; } f({}); f();');
+if ($? != 0) { print "not " };
+print "ok ",++$test," - coredump on typeglob = (SvRV && !SvROK)\n";
+
 
 # test global destruction
 
End of Patch.

Reply via email to