From f5d76e71ba493fffd8a2117586ddccb43d6db2ac Mon Sep 17 00:00:00 2001 From: Petr Písař <ppi...@redhat.com> Date: Aug 09 2017 12:24:13 +0000 Subject: Fix executing arybase::_tie_it() in Safe compartement
--- diff --git a/perl-5.26.0-perl-131588-be-a-little-more-careful-in-arybase-_tie.patch b/perl-5.26.0-perl-131588-be-a-little-more-careful-in-arybase-_tie.patch new file mode 100644 index 0000000..3749874 --- /dev/null +++ b/perl-5.26.0-perl-131588-be-a-little-more-careful-in-arybase-_tie.patch @@ -0,0 +1,61 @@ +From cb2fda94b02c5b7e8d16582410034f5a3dae526f Mon Sep 17 00:00:00 2001 +From: Tony Cook <t...@develop-help.com> +Date: Tue, 25 Jul 2017 16:21:22 +1000 +Subject: [PATCH] (perl #131588) be a little more careful in arybase::_tie_it() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Original patch by John Leitch <j...@autosectools.com> +Petr Pisar: Ported to 5.26.0. + +Signed-off-by: Petr Písař <ppi...@redhat.com> +--- + ext/arybase/arybase.xs | 10 ++++++---- + ext/arybase/t/arybase.t | 4 +++- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs +index 880bbe3..216442a 100644 +--- a/ext/arybase/arybase.xs ++++ b/ext/arybase/arybase.xs +@@ -438,10 +438,12 @@ _tie_it(SV *sv) + INIT: + GV * const gv = (GV *)sv; + CODE: +- if (GvSV(gv)) +- /* This is *our* scalar now! */ +- sv_unmagic(GvSV(gv), PERL_MAGIC_sv); +- tie(aTHX_ GvSVn(gv), NULL, GvSTASH(CvGV(cv))); ++ if (isGV(gv)) { ++ if (GvSV(gv)) ++ /* This is *our* scalar now! */ ++ sv_unmagic(GvSV(gv), PERL_MAGIC_sv); ++ tie(aTHX_ GvSVn(gv), NULL, GvSTASH(CvGV(cv))); ++ } + + void + FETCH(...) +diff --git a/ext/arybase/t/arybase.t b/ext/arybase/t/arybase.t +index f3d3287..41e90df 100644 +--- a/ext/arybase/t/arybase.t ++++ b/ext/arybase/t/arybase.t +@@ -4,7 +4,7 @@ + # plus miscellaneous bug fix tests + + no warnings 'deprecated'; +-use Test::More tests => 7; ++use Test::More tests => 8; + + sub outside_base_scope { return "${'['}" } + +@@ -34,4 +34,6 @@ is $@, "That use of \$[ is unsupported at $f line $l.\n", + + sub foo { my $x; $x = wait } # compilation of this routine used to crash + ++ok eval { arybase::_tie_it(1); 1 }, "don't crash on bad call to _tie_it()"; ++ + 1; +-- +2.9.4 + diff --git a/perl.spec b/perl.spec index f396b03..5f7ef38 100644 --- a/perl.spec +++ b/perl.spec @@ -204,6 +204,10 @@ Patch50: perl-5.27.1-perl-131645-Fix-assert-fail-in-pp_sselect.patch # Fix error message for "our sub foo::bar", RT#131679, in upstream after 5.27.1 Patch51: perl-5.27.1-perl-131679-Fix-our-sub-foo-bar-message.patch +# Fix executing arybase::_tie_it() in Safe compartement, RT#131588, +# not yet accepted by upstream +Patch52: perl-5.26.0-perl-131588-be-a-little-more-careful-in-arybase-_tie.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -2785,6 +2789,7 @@ Perl extension for Version Objects %patch49 -p1 %patch50 -p1 %patch51 -p1 +%patch52 -p1 %patch200 -p1 %patch201 -p1 @@ -2821,6 +2826,7 @@ perl -x patchlevel.h \ 'Fedora Patch49: Do not display too many bytes when reporting malformed UTF-8 character' \ 'Fedora Patch50: Fix select called with a repeated magical variable (RT#131645)' \ 'Fedora Patch51: Fix error message for "our sub foo::bar" (RT#131679)' \ + 'Fedora Patch52: Fix executing arybase::_tie_it() in Safe compartement (RT#131588)' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -5113,6 +5119,7 @@ popd - Do not display too many bytes when reporting malformed UTF-8 character - Fix select called with a repeated magical variable (RT#131645) - Fix error message for "our sub foo::bar" (RT#131679) +- Fix executing arybase::_tie_it() in Safe compartement (RT#131588) * Sat Jul 29 2017 Igor Gnatenko <ignatenkobr...@fedoraproject.org> - 4:5.26.0-397 - Enable separate debuginfo back https://src.fedoraproject.org/rpms/perl/c/f5d76e71ba493fffd8a2117586ddccb43d6db2ac?branch=master _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org