Resolve bugzilla 114271

This commit is contained in:
Tom Callaway 2007-10-18 17:18:38 +00:00
parent 0a91f37e30
commit ff74b82de1
2 changed files with 41 additions and 1 deletions

34
perl-5.8.8-bug24254.patch Normal file
View File

@ -0,0 +1,34 @@
diff -up perl-5.8.8/cop.h.BAD perl-5.8.8/cop.h
--- perl-5.8.8/cop.h.BAD 2007-10-18 09:54:16.000000000 -0400
+++ perl-5.8.8/cop.h 2007-10-18 09:56:17.000000000 -0400
@@ -286,9 +286,14 @@ struct block_loop {
#define POPLOOP(cx) \
SvREFCNT_dec(cx->blk_loop.iterlval); \
if (CxITERVAR(cx)) { \
- SV **s_v_p = CxITERVAR(cx); \
- sv_2mortal(*s_v_p); \
- *s_v_p = cx->blk_loop.itersave; \
+ if (SvPADMY(cx->blk_loop.itersave)) { \
+ SV **s_v_p = CxITERVAR(cx); \
+ sv_2mortal(*s_v_p); \
+ *s_v_p = cx->blk_loop.itersave; \
+ } \
+ else { \
+ SvREFCNT_dec(cx->blk_loop.itersave); \
+ } \
} \
if (cx->blk_loop.iterary && cx->blk_loop.iterary != PL_curstack)\
SvREFCNT_dec(cx->blk_loop.iterary);
diff -up perl-5.8.8/t/op/local.t.BAD perl-5.8.8/t/op/local.t
--- perl-5.8.8/t/op/local.t.BAD 2007-10-18 10:53:10.000000000 -0400
+++ perl-5.8.8/t/op/local.t 2007-10-18 10:53:44.000000000 -0400
@@ -324,7 +324,7 @@ like($@, qr/Modification of a read-only
# make sure $1 is still read-only
eval { for ($1) { local $_ = 1 } };
-is($@, "");
+like($@, qr/Modification of a read-only value attempted/);
# The s/// adds 'g' magic to $_, but it should remain non-readonly
eval { for("a") { for $x (1,2) { local $_="b"; s/(.*)/+$1/ } } };
diff -up perl-5.8.8/op.c.BAD perl-5.8.8/op.c

View File

@ -24,7 +24,7 @@
Name: perl
Version: %{perl_version}
Release: 29%{?dist}
Release: 30%{?dist}
Epoch: %{perl_epoch}
Summary: The Perl programming language
Group: Development/Languages
@ -125,6 +125,8 @@ Patch40: perl-5.8.8-U28775.patch
Patch41: perl-5.8.8-bz247386-file-spec-cwd.patch
# Update DB_File to 1.815
Patch42: perl-5.8.8-DB_File-1.815.patch
# Fix from perl bug #24254
Patch43: perl-5.8.8-bug24254.patch
BuildRoot: %{_tmppath}/%{name}-%{perl_version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: tcsh, dos2unix, man, groff
@ -387,6 +389,7 @@ upstream tarball from perl.org.
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
#
# Candidates for doc recoding (need case by case review):
# find . -name "*.pod" -o -name "README*" -o -name "*.pm" | xargs file -i | grep charset= | grep -v '\(us-ascii\|utf-8\)'
@ -786,6 +789,9 @@ make test
# Nothing. Nada. Zilch. Zarro. Uh uh. Nope. Sorry.
%changelog
* Thu Oct 18 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 4:5.8.8-30
- patch from perl bug 24254, fix for RH bz 114271
* Tue Oct 16 2007 Robin Norwood <rnorwood@redhat.com> - 4:5.8.8-29
- Add Artistic, AUTHORS, and Changes* to %%docs.
- Compress Changes* to save space.