[perl/f16] Fix interrupted reading

Petr Pisar ppisar at fedoraproject.org
Wed Dec 21 12:53:50 UTC 2011


commit 3722a706893509ac50889e33e4619a5803874bdb
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Dec 20 17:45:53 2011 +0100

    Fix interrupted reading

 ...couple-missing-LEAVEs-in-perlio_async_run.patch |   36 ++++++++++++++++++++
 perl.spec                                          |   11 +++++-
 2 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/perl-5.14.2-add-a-couple-missing-LEAVEs-in-perlio_async_run.patch b/perl-5.14.2-add-a-couple-missing-LEAVEs-in-perlio_async_run.patch
new file mode 100644
index 0000000..145e92e
--- /dev/null
+++ b/perl-5.14.2-add-a-couple-missing-LEAVEs-in-perlio_async_run.patch
@@ -0,0 +1,36 @@
+From be48bbe8d671b6841c3ec7cb734b98071afe3cd9 Mon Sep 17 00:00:00 2001
+From: Chip <chip at pobox.com>
+Date: Mon, 19 Sep 2011 23:51:49 -0700
+Subject: [PATCH] add a couple missing LEAVEs in perlio_async_run()
+
+---
+ perlio.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/perlio.c b/perlio.c
+index f0d67ae..79c6fdf 100644
+--- a/perlio.c
++++ b/perlio.c
+@@ -2563,8 +2563,10 @@ S_perlio_async_run(pTHX_ PerlIO* f) {
+     SAVEDESTRUCTOR_X(S_lockcnt_dec, (void*)f);
+     PerlIO_lockcnt(f)++;
+     PERL_ASYNC_CHECK();
+-    if ( !(PerlIOBase(f)->flags & PERLIO_F_CLEARED) )
++    if ( !(PerlIOBase(f)->flags & PERLIO_F_CLEARED) ) {
++	LEAVE;
+ 	return 0;
++    }
+     /* we've just run some perl-level code that could have done
+      * anything, including closing the file or clearing this layer.
+      * If so, free any lower layers that have already been
+@@ -2576,6 +2578,7 @@ S_perlio_async_run(pTHX_ PerlIO* f) {
+ 	*f = l->next;
+ 	Safefree(l);
+     }
++    LEAVE;
+     return 1;
+ }
+ 
+-- 
+1.7.7.4
+
diff --git a/perl.spec b/perl.spec
index 62d1aca..3276ab2 100644
--- a/perl.spec
+++ b/perl.spec
@@ -22,7 +22,7 @@
 Name:           perl
 Version:        %{perl_version}
 # release number must be even higher, because dual-lived modules will be broken otherwise
-Release:        192%{?dist}
+Release:        193%{?dist}
 Epoch:          %{perl_epoch}
 Summary:        Practical Extraction and Report Language
 Group:          Development/Languages
@@ -79,6 +79,9 @@ Patch10:        perl-5.14.2-large-repeat-heap-abuse.patch
 # after 5.14.2.
 Patch11:        perl-5.14.2-Don-t-leak-memory-when-accessing-named-capt.patch
 
+# Fix interrupted reading, rhbz#767931, fixed after 5.15.3.
+Patch12:        perl-5.14.2-add-a-couple-missing-LEAVEs-in-perlio_async_run.patch
+
 # Update some of the bundled modules
 # see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
 
@@ -1107,6 +1110,7 @@ tarball from perl.org.
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 #copy the example script
 cp -a %{SOURCE5} .
@@ -1299,6 +1303,7 @@ pushd %{build_archlib}/CORE/
     'Fedora Patch9: Fix code injection in Digest->new()' \
     'Fedora Patch10: Change Perl_repeatcpy() to allow count above 2^31' \
     'Fedora Patch11: Fix leak with non-matching named captures' \
+    'Fedora Patch12: Fix interrupted reading' \
     %{nil}
 
 rm patchlevel.bak
@@ -2182,6 +2187,10 @@ sed \
 
 # Old changelog entries are preserved in CVS.
 %changelog
+* Tue Dec 20 2011 Petr Pisar <ppisar at redhat.com> - 4:5.14.2-193
+- Fix interrupted reading. Thanks to Šimon Lukašík for reporting this issue
+  and thanks to Marcela Mašláňová for finding fix. (bug #767931)
+
 * Wed Dec 14 2011 Petr Pisar <ppisar at redhat.com> - 4:5.14.2-192
 - Fix leak with non-matching named captures (bug #767597)
 


More information about the scm-commits mailing list