summaryrefslogtreecommitdiff
path: root/lang/perl5.16/files/patch-bug52074-54566
diff options
context:
space:
mode:
authorSergey Skvortsov <skv@FreeBSD.org>2009-04-04 09:06:53 +0000
committerSergey Skvortsov <skv@FreeBSD.org>2009-04-04 09:06:53 +0000
commitd70143844849daaab2b798d1f12f92ba5037be3f (patch)
tree01e3fef15f2eb91721ec1e9ecc54d96ce294a67f /lang/perl5.16/files/patch-bug52074-54566
parentupdate to 0.62.2 (diff)
Add several bugfixes, imported from maint-5.10
(i.e. will be included into forthcoming 5.10.1).
Notes
Notes: svn path=/head/; revision=231575
Diffstat (limited to 'lang/perl5.16/files/patch-bug52074-54566')
-rw-r--r--lang/perl5.16/files/patch-bug52074-5456644
1 files changed, 44 insertions, 0 deletions
diff --git a/lang/perl5.16/files/patch-bug52074-54566 b/lang/perl5.16/files/patch-bug52074-54566
new file mode 100644
index 000000000000..259a39585db7
--- /dev/null
+++ b/lang/perl5.16/files/patch-bug52074-54566
@@ -0,0 +1,44 @@
+# http://rt.perl.org/rt3/Public/Bug/Display.html?id=52074
+# http://rt.perl.org/rt3/Public/Bug/Display.html?id=54566
+# http://perl5.git.perl.org/perl.git/commitdiff/5562fa714b8071354c365365c26a950efa73179a?hp=b3562f19ee0d76b60d176a0b1cfdac4f5f36785c
+# http://perl5.git.perl.org/perl.git/commitdiff/ea86b3de3510ce31d0c08dd6a21701d74b25369d?hp=72bfe1b2b35945ea3c95d9b94ae2908121292236
+diff --git a/mg.c b/mg.c
+index c4d7aeb..91a36f2 100644
+--- mg.c
++++ mg.c
+@@ -1543,10 +1543,11 @@ Perl_magic_setisa(pTHX_ SV *sv, MAGIC *mg)
+ stash = GvSTASH(
+ SvTYPE(mg->mg_obj) == SVt_PVGV
+ ? (GV*)mg->mg_obj
+- : (GV*)SvMAGIC(mg->mg_obj)->mg_obj
++ : (GV*)mg_find(mg->mg_obj, PERL_MAGIC_isa)->mg_obj
+ );
+
+- mro_isa_changed_in(stash);
++ if (stash)
++ mro_isa_changed_in(stash);
+
+ return 0;
+ }
+diff --git a/t/mro/pkg_gen.t b/t/mro/pkg_gen.t
+index 6a507ac..e1f5eb0 100644
+--- t/mro/pkg_gen.t
++++ t/mro/pkg_gen.t
+@@ -4,7 +4,7 @@ use strict;
+ use warnings;
+
+ chdir 't' if -d 't';
+-require q(./test.pl); plan(tests => 6);
++require q(./test.pl); plan(tests => 7);
+
+ {
+ package Foo;
+@@ -34,3 +34,7 @@ is(mro::get_pkg_gen('Foo'), 1, "pkg_gen 1 for undef %Pkg::");
+
+ delete $::{"Foo::"};
+ is(mro::get_pkg_gen('Foo'), 0, 'pkg_gen 0 for delete $::{Pkg::}');
++
++delete $::{"Quux::"};
++push @Quux::ISA, "Woot"; # should not segfault
++ok(1, "No segfault on modification of ISA in a deleted stash");
+