[perl/f17] Do not crash when vivifying $|

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 67c66444384247011fbf2749b1c65a8f2a1f9f14
Author: Jitka Plesnikova <jplesnik@xxxxxxxxxx>
Date:   Thu Oct 18 15:21:24 2012 +0200

    Do not crash when vivifying $|

 ....1-perl-115206-Don-t-crash-when-vivifying.patch |   51 ++++++++++++++++++++
 perl.spec                                          |   10 ++++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/perl-5.16.1-perl-115206-Don-t-crash-when-vivifying.patch b/perl-5.16.1-perl-115206-Don-t-crash-when-vivifying.patch
new file mode 100644
index 0000000..3b6a213
--- /dev/null
+++ b/perl-5.16.1-perl-115206-Don-t-crash-when-vivifying.patch
@@ -0,0 +1,51 @@
+diff --git a/gv.c b/gv.c
+index f352452..cf02ca4 100644
+--- a/gv.c
++++ b/gv.c
+@@ -1504,10 +1504,6 @@ Perl_gv_fetchpvn_flags(pTHX_ const char
+ 		Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX),
+ 				 "$%c is no longer supported", *name);
+ 	    break;
+-	case '|':		/* $| */
+-	    sv_setiv(GvSVn(gv), (IV)(IoFLAGS(GvIOp(PL_defoutgv)) & IOf_FLUSH) != 0);
+-	    goto magicalize;
+-
+ 	case '\010':	/* $^H */
+ 	    {
+ 		HV *const hv = GvHVn(gv);
+@@ -1540,6 +1536,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char
+ 	case '>':		/* $> */
+ 	case '\\':		/* $\ */
+ 	case '/':		/* $/ */
++	case '|':		/* $| */
+ 	case '\001':	/* $^A */
+ 	case '\003':	/* $^C */
+ 	case '\004':	/* $^D */
+diff --git a/t/op/magic.t b/t/op/magic.t
+index 3fb1ea1..1bcfbd9 100644
+--- a/t/op/magic.t
++++ b/t/op/magic.t
+@@ -12,7 +12,7 @@ BEGIN {
+ use warnings;
+ use Config;
+ 
+-plan (tests => 87);
++plan (tests => 88);
+ 
+ $Is_MSWin32  = $^O eq 'MSWin32';
+ $Is_NetWare  = $^O eq 'NetWare';
+@@ -471,6 +471,11 @@ foreach my $sig (qw(__DIE__ _BOGUS_HOOK
+ 
+ }
+ 
++# $|
++fresh_perl_is
++ 'select f; undef *f; ${q/|/}; print STDOUT qq|ok\n|', "ok\n", {}, 
++ '[perl #115206] no crash when vivifying $| while *{+select}{IO} is undef';
++
+ # ^^^^^^^^^ New tests go here ^^^^^^^^^
+ 
+ SKIP: {
+-- 
+1.7.7.6
+
diff --git a/perl.spec b/perl.spec
index 4cddecf..98c8d1b 100644
--- a/perl.spec
+++ b/perl.spec
@@ -24,7 +24,7 @@
 Name:           perl
 Version:        %{perl_version}
 # release number must be even higher, because dual-lived modules will be broken otherwise
-Release:        216%{?dist}
+Release:        217%{?dist}
 Epoch:          %{perl_epoch}
 Summary:        Practical Extraction and Report Language
 Group:          Development/Languages
@@ -101,6 +101,9 @@ Patch17:        perl-5.14.2-RT-113730-should-be-cleared-on-do-IO-error.patch
 # Do not truncate syscall() return value to 32 bits, rhbz#838551, RT#113980
 Patch18:        perl-5.16.1-perl-113980-pp_syscall-I32-retval-truncates-the-retu.patch
 
+# Do not crash when vivifying $|, rhbz#865296, RT#115206
+Patch19:        perl-5.16.1-perl-115206-Don-t-crash-when-vivifying.patch
+
 # Free hash entries before values on delete, rhbz#771303, RT#100340
 Patch20:        perl-5.14.2-perl-100340-Free-hash-entries-before-values-on-delet.patch
 
@@ -1277,6 +1280,7 @@ tarball from perl.org.
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1
+%patch19 -p1
 %patch20 -p1
 %patch21 -p1
 
@@ -1486,6 +1490,7 @@ pushd %{build_archlib}/CORE/
     'Fedora Patch16: Fix find2perl to translate ? glob properly (RT#113054)' \
     'Fedora Patch17: Clear $@ before "do" I/O error (RT#113730)' \
     'Fedora Patch18: Do not truncate syscall() return value to 32 bits (RT#113980)' \
+    'Fedora Patch19: Do not crash when vivifying $|' \
     'Fedora Patch20: Free hash entries before values on delete (RT#100340)' \
     'Fedora Patch21: Override the Pod::Simple::parse_file (CPANRT#77530)' \
     %{nil}
@@ -2439,6 +2444,9 @@ sed \
 
 # Old changelog entries are preserved in CVS.
 %changelog
+* Wed Oct 17 2012 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 4:5.14.3-217
+- Do not crash when vivifying $| (bug #865296)
+
 * Mon Oct 15 2012 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 4:5.14.3-216
 - 5.14.3 bump (see
   https://metacpan.org/module/DOM/perl-5.14.3/pod/perldelta.pod for release
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel



[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux