Fix interrupted reading

This commit is contained in:
Petr Písař 2011-12-20 17:45:53 +01:00
parent dbe8201b14
commit 9d00dde788
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From be48bbe8d671b6841c3ec7cb734b98071afe3cd9 Mon Sep 17 00:00:00 2001
From: Chip <chip@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

View File

@ -24,7 +24,7 @@
Name: perl
Version: %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
Release: 206%{?dist}
Release: 207%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@ -81,6 +81,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
@ -1243,6 +1246,7 @@ tarball from perl.org.
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
#copy the example script
cp -a %{SOURCE5} .
@ -1444,6 +1448,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
@ -2401,6 +2406,10 @@ sed \
# Old changelog entries are preserved in CVS.
%changelog
* Tue Dec 20 2011 Petr Pisar <ppisar@redhat.com> - 4:5.14.2-207
- 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@redhat.com> - 4:5.14.2-206
- Fix leak with non-matching named captures (bug #767597)