pghmcfc pushed to perl-Contextual-Return
(perl-Contextual-Return-0.004010-1.fc26). "Update to 0.004010 (..more)"
by notifications@fedoraproject.org
From 9104e8908d85eabd3cd36799d093261d708402e1 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul(a)city-fan.org>
Date: Thu, 1 Dec 2016 09:26:16 +0000
Subject: Update to 0.004010
- New upstream release 0.004010
- Spelling fix in POD
- Improved DUMP behaviour when passed a non-CRV argument
---
.gitignore | 1 +
perl-Contextual-Return.spec | 7 ++++++-
sources | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 3eb8783..37024ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ Contextual-Return-v0.2.1.tar.gz
/Contextual-Return-0.004007.tar.gz
/Contextual-Return-0.004008.tar.gz
/Contextual-Return-0.004009.tar.gz
+/Contextual-Return-0.004010.tar.gz
diff --git a/perl-Contextual-Return.spec b/perl-Contextual-Return.spec
index af18505..a0c9a3c 100644
--- a/perl-Contextual-Return.spec
+++ b/perl-Contextual-Return.spec
@@ -1,5 +1,5 @@
Name: perl-Contextual-Return
-Version: 0.004009
+Version: 0.004010
Release: 1%{?dist}
Summary: Create context-sensitive return values
License: GPL+ or Artistic
@@ -55,6 +55,11 @@ make test
%{_mandir}/man3/Contextual::Return::Failure.3*
%changelog
+* Thu Dec 1 2016 Paul Howarth <paul(a)city-fan.org> - 0.004010-1
+- Update to 0.004010
+ - Spelling fix in POD
+ - Improved DUMP behaviour when passed a non-CRV argument
+
* Fri Nov 18 2016 Paul Howarth <paul(a)city-fan.org> - 0.004009-1
- Update to 0.004009
- Improved behaviour of FREEZE
diff --git a/sources b/sources
index 772eb7c..c4bf441 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-10120d38c3e82ee01d8b8905793fcb3d Contextual-Return-0.004009.tar.gz
+97038dcd2e8ae9a8e2718b6acfeaa6cf Contextual-Return-0.004010.tar.gz
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Contextual-Return.git/commit/?h=p...
7 years, 4 months
pghmcfc pushed to perl-Contextual-Return (master). "Update to
0.004010 (..more)"
by notifications@fedoraproject.org
From 9104e8908d85eabd3cd36799d093261d708402e1 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul(a)city-fan.org>
Date: Thu, 1 Dec 2016 09:26:16 +0000
Subject: Update to 0.004010
- New upstream release 0.004010
- Spelling fix in POD
- Improved DUMP behaviour when passed a non-CRV argument
---
.gitignore | 1 +
perl-Contextual-Return.spec | 7 ++++++-
sources | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 3eb8783..37024ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ Contextual-Return-v0.2.1.tar.gz
/Contextual-Return-0.004007.tar.gz
/Contextual-Return-0.004008.tar.gz
/Contextual-Return-0.004009.tar.gz
+/Contextual-Return-0.004010.tar.gz
diff --git a/perl-Contextual-Return.spec b/perl-Contextual-Return.spec
index af18505..a0c9a3c 100644
--- a/perl-Contextual-Return.spec
+++ b/perl-Contextual-Return.spec
@@ -1,5 +1,5 @@
Name: perl-Contextual-Return
-Version: 0.004009
+Version: 0.004010
Release: 1%{?dist}
Summary: Create context-sensitive return values
License: GPL+ or Artistic
@@ -55,6 +55,11 @@ make test
%{_mandir}/man3/Contextual::Return::Failure.3*
%changelog
+* Thu Dec 1 2016 Paul Howarth <paul(a)city-fan.org> - 0.004010-1
+- Update to 0.004010
+ - Spelling fix in POD
+ - Improved DUMP behaviour when passed a non-CRV argument
+
* Fri Nov 18 2016 Paul Howarth <paul(a)city-fan.org> - 0.004009-1
- Update to 0.004009
- Improved behaviour of FREEZE
diff --git a/sources b/sources
index 772eb7c..c4bf441 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-10120d38c3e82ee01d8b8905793fcb3d Contextual-Return-0.004009.tar.gz
+97038dcd2e8ae9a8e2718b6acfeaa6cf Contextual-Return-0.004010.tar.gz
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Contextual-Return.git/commit/?h=m...
7 years, 4 months
ppisar pushed to perl (master). "Fix const correctness in hv_func.h"
by notifications@fedoraproject.org
From bfea7ab5df9d8e572873c6b4ce819aa30de2a97a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Dec 2016 08:03:27 +0100
Subject: Fix const correctness in hv_func.h
---
...5.25.7-Fix-const-correctness-in-hv_func.h.patch | 124 +++++++++++++++++++++
perl.spec | 7 ++
2 files changed, 131 insertions(+)
create mode 100644 perl-5.25.7-Fix-const-correctness-in-hv_func.h.patch
diff --git a/perl-5.25.7-Fix-const-correctness-in-hv_func.h.patch b/perl-5.25.7-Fix-const-correctness-in-hv_func.h.patch
new file mode 100644
index 0000000..5f2a428
--- /dev/null
+++ b/perl-5.25.7-Fix-const-correctness-in-hv_func.h.patch
@@ -0,0 +1,124 @@
+From 463ddf34c08f2c97199b1bb242da1f17494d4d1a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
+Date: Thu, 24 Nov 2016 16:34:09 +0100
+Subject: [PATCH] Fix const correctness in hv_func.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Building an XS code with -Wcast-qual yielded warnings about discarding
+const qualifiers from pointer targets like:
+
+$ printf '#include "EXTERN.h"\n#include "perl.h"\n' | gcc -Wcast-qual -I/usr/lib64/perl5/CORE -c -x c -
+In file included from /usr/lib64/perl5/CORE/hv.h:629:0,
+ from /usr/lib64/perl5/CORE/perl.h:3740,
+ from <stdin>:2:
+/usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_siphash_2_4’:
+/usr/lib64/perl5/CORE/hv_func.h:213:17: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
+ U64TYPE k0 = ((U64TYPE*)seed)[0];
+ ^
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ hv_func.h | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/hv_func.h b/hv_func.h
+index 8866db9..57b1ed1 100644
+--- a/hv_func.h
++++ b/hv_func.h
+@@ -118,7 +118,7 @@
+
+ #if (BYTEORDER == 0x1234 || BYTEORDER == 0x12345678) && U32SIZE == 4
+ /* CPU endian matches murmurhash algorithm, so read 32-bit word directly */
+- #define U8TO32_LE(ptr) (*((U32*)(ptr)))
++ #define U8TO32_LE(ptr) (*((const U32*)(ptr)))
+ #elif BYTEORDER == 0x4321 || BYTEORDER == 0x87654321
+ /* TODO: Add additional cases below where a compiler provided bswap32 is available */
+ #if defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
+@@ -210,8 +210,8 @@ S_perl_hash_siphash_2_4(const unsigned char * const seed, const unsigned char *i
+ U64 v3 = UINT64_C(0x7465646279746573);
+
+ U64 b;
+- U64 k0 = ((U64*)seed)[0];
+- U64 k1 = ((U64*)seed)[1];
++ U64 k0 = ((const U64*)seed)[0];
++ U64 k1 = ((const U64*)seed)[1];
+ U64 m;
+ const int left = inlen & 7;
+ const U8 *end = in + inlen - left;
+@@ -269,7 +269,7 @@ S_perl_hash_siphash_2_4(const unsigned char * const seed, const unsigned char *i
+
+ PERL_STATIC_INLINE U32
+ S_perl_hash_superfast(const unsigned char * const seed, const unsigned char *str, STRLEN len) {
+- U32 hash = *((U32*)seed) + (U32)len;
++ U32 hash = *((const U32*)seed) + (U32)len;
+ U32 tmp;
+ int rem= len & 3;
+ len >>= 2;
+@@ -373,7 +373,7 @@ S_perl_hash_superfast(const unsigned char * const seed, const unsigned char *str
+ /* now we create the hash function */
+ PERL_STATIC_INLINE U32
+ S_perl_hash_murmur3(const unsigned char * const seed, const unsigned char *ptr, STRLEN len) {
+- U32 h1 = *((U32*)seed);
++ U32 h1 = *((const U32*)seed);
+ U32 k1;
+ U32 carry = 0;
+
+@@ -467,7 +467,7 @@ S_perl_hash_murmur3(const unsigned char * const seed, const unsigned char *ptr,
+ PERL_STATIC_INLINE U32
+ S_perl_hash_djb2(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
+ const unsigned char * const end = (const unsigned char *)str + len;
+- U32 hash = *((U32*)seed) + (U32)len;
++ U32 hash = *((const U32*)seed) + (U32)len;
+ while (str < end) {
+ hash = ((hash << 5) + hash) + *str++;
+ }
+@@ -477,7 +477,7 @@ S_perl_hash_djb2(const unsigned char * const seed, const unsigned char *str, con
+ PERL_STATIC_INLINE U32
+ S_perl_hash_sdbm(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
+ const unsigned char * const end = (const unsigned char *)str + len;
+- U32 hash = *((U32*)seed) + (U32)len;
++ U32 hash = *((const U32*)seed) + (U32)len;
+ while (str < end) {
+ hash = (hash << 6) + (hash << 16) - hash + *str++;
+ }
+@@ -503,7 +503,7 @@ S_perl_hash_sdbm(const unsigned char * const seed, const unsigned char *str, con
+ PERL_STATIC_INLINE U32
+ S_perl_hash_one_at_a_time(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
+ const unsigned char * const end = (const unsigned char *)str + len;
+- U32 hash = *((U32*)seed) + (U32)len;
++ U32 hash = *((const U32*)seed) + (U32)len;
+ while (str < end) {
+ hash += *str++;
+ hash += (hash << 10);
+@@ -518,7 +518,7 @@ S_perl_hash_one_at_a_time(const unsigned char * const seed, const unsigned char
+ PERL_STATIC_INLINE U32
+ S_perl_hash_one_at_a_time_hard(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
+ const unsigned char * const end = (const unsigned char *)str + len;
+- U32 hash = *((U32*)seed) + (U32)len;
++ U32 hash = *((const U32*)seed) + (U32)len;
+
+ while (str < end) {
+ hash += (hash << 10);
+@@ -553,7 +553,7 @@ S_perl_hash_one_at_a_time_hard(const unsigned char * const seed, const unsigned
+ PERL_STATIC_INLINE U32
+ S_perl_hash_old_one_at_a_time(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
+ const unsigned char * const end = (const unsigned char *)str + len;
+- U32 hash = *((U32*)seed);
++ U32 hash = *((const U32*)seed);
+ while (str < end) {
+ hash += *str++;
+ hash += (hash << 10);
+@@ -581,7 +581,7 @@ S_perl_hash_murmur_hash_64a (const unsigned char * const seed, const unsigned ch
+ {
+ const U64 m = UINT64_C(0xc6a4a7935bd1e995);
+ const int r = 47;
+- U64 h = *((U64*)seed) ^ len;
++ U64 h = *((const U64*)seed) ^ len;
+ const U64 * data = (const U64 *)str;
+ const U64 * end = data + (len/8);
+ const unsigned char * data2;
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index f4ef603..b4f2109 100644
--- a/perl.spec
+++ b/perl.spec
@@ -230,6 +230,10 @@ Patch60: perl-5.24.0-crash-on-explicit-return-from-s-e.patch
# Fix assigning split() return values to an array, in upstream after 5.25.7
Patch61: perl-5.24.0-split-was-leaving-PL_sv_undef-in-unused-ary-slots.patch
+# Fix const correctness in hv_func.h, bug #1242980, RT#130169,
+# in upstream after 5.25.7
+Patch62: perl-5.25.7-Fix-const-correctness-in-hv_func.h.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
@@ -2917,6 +2921,7 @@ Perl extension for Version Objects
%patch59 -p1
%patch60 -p1
%patch61 -p1
+%patch62 -p1
%patch200 -p1
%patch201 -p1
@@ -2969,6 +2974,7 @@ perl -x patchlevel.h \
'Fedora Patch59: Fix crash in Storable when deserializing malformed code reference (RT#68348, RT#130098)' \
'Fedora Patch60: Fix crash on explicit return from regular expression substitution (RT#130188)' \
'Fedora Patch61: Fix assigning split() return values to an array' \
+ 'Fedora Patch62: Fix const correctness in hv_func.h (RT#130169)' \
'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}
@@ -5253,6 +5259,7 @@ popd
- Fix crash on explicit return from regular expression substitution (RT#130188)
- Tighten dependencies between architecture specific sub-packages to ISA
- Fix assigning split() return values to an array
+- Fix const correctness in hv_func.h (bug #1242980)
* Wed Nov 09 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-380
- Tie perl-Errno release to interpreter build because of kernel version check
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=bfea7ab5d...
7 years, 4 months
ppisar pushed to perl (master). "Fix assigning split() return values
to an array"
by notifications@fedoraproject.org
From 8fcd2745c822fdad4b95f0e2ea61c3af00e0ca6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Dec 2016 07:52:54 +0100
Subject: Fix assigning split() return values to an array
---
...s-leaving-PL_sv_undef-in-unused-ary-slots.patch | 94 ++++++++++++++++++++++
perl.spec | 8 +-
2 files changed, 101 insertions(+), 1 deletion(-)
create mode 100644 perl-5.24.0-split-was-leaving-PL_sv_undef-in-unused-ary-slots.patch
diff --git a/perl-5.24.0-split-was-leaving-PL_sv_undef-in-unused-ary-slots.patch b/perl-5.24.0-split-was-leaving-PL_sv_undef-in-unused-ary-slots.patch
new file mode 100644
index 0000000..7f9de6d
--- /dev/null
+++ b/perl-5.24.0-split-was-leaving-PL_sv_undef-in-unused-ary-slots.patch
@@ -0,0 +1,94 @@
+From 27a8a9e2a55ccc148582006396a9c35bafa5f0b3 Mon Sep 17 00:00:00 2001
+From: David Mitchell <davem(a)iabyn.com>
+Date: Wed, 30 Nov 2016 08:59:01 +0000
+Subject: [PATCH] split was leaving PL_sv_undef in unused ary slots
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Petr Pisar: Ported to 5.24.0:
+
+commit 71ca73e5fa9639ac33e9f2e74cd0c32288a5040d
+Author: David Mitchell <davem(a)iabyn.com>
+Date: Wed Nov 30 08:59:01 2016 +0000
+
+ split was leaving PL_sv_undef in unused ary slots
+
+ This:
+
+ @a = split(/-/,"-");
+ $a[1] = undef;
+ $a[0] = 0;
+
+ was giving
+
+ Modification of a read-only value attempted at foo line 3.
+
+ This is because:
+
+ 1) unused slots in AvARRAY between AvFILL and AvMAX should always be
+ null; av_clear(), av_extend() etc do this; while av_store(), if storing
+ to a slot N somewhere between AvFILL and AvMAX, doesn't bother to clear
+ between (AvFILL+1)..(N-1) on the assumption that everyone else plays
+ nicely.
+
+ 2) pp_split() when splitting directly to an array, sometimes over-splits
+ and has to null out the excess elements;
+
+ 3) Since perl 5.19.4, unused AV slots are now marked with NULL rather than
+ &PL_sv_undef;
+
+ 4) pp_split was still using &PL_sv_undef;
+
+ The fault was with (4), and is easily fixed.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ pp.c | 2 +-
+ t/op/split.t | 13 ++++++++++++-
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/pp.c b/pp.c
+index 4153482..70345ce 100644
+--- a/pp.c
++++ b/pp.c
+@@ -6212,7 +6212,7 @@ PP(pp_split)
+ while (iters > 0 && (!TOPs || !SvANY(TOPs) || SvCUR(TOPs) == 0)) {
+ if (TOPs && !make_mortal)
+ sv_2mortal(TOPs);
+- *SP-- = &PL_sv_undef;
++ *SP-- = NULL;
+ iters--;
+ }
+ }
+diff --git a/t/op/split.t b/t/op/split.t
+index fb73271..b7846a1 100644
+--- a/t/op/split.t
++++ b/t/op/split.t
+@@ -7,7 +7,7 @@ BEGIN {
+ set_up_inc('../lib');
+ }
+
+-plan tests => 131;
++plan tests => 133;
+
+ $FS = ':';
+
+@@ -523,3 +523,14 @@ is "@a", '1 2 3', 'assignment to split-to-array (pmtarget/package array)';
+ }
+ (@{\@a} = split //, "abc") = 1..10;
+ is "@a", '1 2 3', 'assignment to split-to-array (stacked)';
++
++# splitting directly to an array wasn't filling unused AvARRAY slots with
++# NULL
++
++{
++ my @a;
++ @a = split(/-/,"-");
++ $a[1] = 'b';
++ ok eval { $a[0] = 'a'; 1; }, "array split filling AvARRAY: assign 0";
++ is "@a", "a b", "array split filling AvARRAY: result";
++}
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index a47eacc..f4ef603 100644
--- a/perl.spec
+++ b/perl.spec
@@ -227,6 +227,9 @@ Patch59: perl-5.25.7-Fix-Storable-segfaults.patch
# in upstream after 5.25.7
Patch60: perl-5.24.0-crash-on-explicit-return-from-s-e.patch
+# Fix assigning split() return values to an array, in upstream after 5.25.7
+Patch61: perl-5.24.0-split-was-leaving-PL_sv_undef-in-unused-ary-slots.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
@@ -2913,6 +2916,7 @@ Perl extension for Version Objects
%patch58 -p1
%patch59 -p1
%patch60 -p1
+%patch61 -p1
%patch200 -p1
%patch201 -p1
@@ -2964,6 +2968,7 @@ perl -x patchlevel.h \
'Fedora Patch58: Fix stack handling when calling chdir without an argument (RT#129130)' \
'Fedora Patch59: Fix crash in Storable when deserializing malformed code reference (RT#68348, RT#130098)' \
'Fedora Patch60: Fix crash on explicit return from regular expression substitution (RT#130188)' \
+ 'Fedora Patch61: Fix assigning split() return values to an array' \
'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}
@@ -5242,11 +5247,12 @@ popd
# Old changelog entries are preserved in CVS.
%changelog
-* Mon Nov 28 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-381
+* Thu Dec 01 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-381
- Fix crash in Storable when deserializing malformed code reference
(RT#68348, RT#130098)
- Fix crash on explicit return from regular expression substitution (RT#130188)
- Tighten dependencies between architecture specific sub-packages to ISA
+- Fix assigning split() return values to an array
* Wed Nov 09 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-380
- Tie perl-Errno release to interpreter build because of kernel version check
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=8fcd2745c...
7 years, 4 months
ppisar pushed to perl (master). "Fix crash on explicit return from
regular expression substitution"
by notifications@fedoraproject.org
From 41b63f733029c1e0f966501b4b9a15159bb3e992 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Mon, 28 Nov 2016 14:15:43 +0100
Subject: Fix crash on explicit return from regular expression substitution
---
...-5.24.0-crash-on-explicit-return-from-s-e.patch | 94 ++++++++++++++++++++++
perl.spec | 7 ++
2 files changed, 101 insertions(+)
create mode 100644 perl-5.24.0-crash-on-explicit-return-from-s-e.patch
diff --git a/perl-5.24.0-crash-on-explicit-return-from-s-e.patch b/perl-5.24.0-crash-on-explicit-return-from-s-e.patch
new file mode 100644
index 0000000..d7fd09d
--- /dev/null
+++ b/perl-5.24.0-crash-on-explicit-return-from-s-e.patch
@@ -0,0 +1,94 @@
+From 2c639acf40b4abc2783352f8e20dbfb68389e633 Mon Sep 17 00:00:00 2001
+From: David Mitchell <davem(a)iabyn.com>
+Date: Mon, 28 Nov 2016 08:03:49 +0000
+Subject: [PATCH] crash on explicit return from s///e
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Petr Pisar: Ported to 5.24.0:
+
+commit 7332835e5da7b7a793ef814a84e53003be1d0138
+Author: David Mitchell <davem(a)iabyn.com>
+Date: Mon Nov 28 08:03:49 2016 +0000
+
+ crash on explicit return from s///e
+
+ RT #130188
+
+ In
+
+ sub f {
+ my $x = 'a';
+ $x =~ s/./return;/e;
+ }
+
+ the 'return' triggers popping any contexts above the subroutine context:
+ in this case, a CXt_SUBST context. In this case, Perl_dounwind() calls
+ cx_popblock() for the bottom-most popped context, to restore any saved
+ vars. However, CXt_SUBST is the one context type which *doesn't* use
+ 'struct block' as part of its context struct union, so you can't
+ cx_popblock() a CXt_SUBST context.
+
+ This commit makes it skip the cx_popblock() in this case.
+
+ Bug was introduced by me with v5.23.7-235-gfc6e609.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ pp_ctl.c | 6 ++++++
+ t/re/subst.t | 17 ++++++++++++++++-
+ 2 files changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/pp_ctl.c b/pp_ctl.c
+index 99ff59a..b94c09a 100644
+--- a/pp_ctl.c
++++ b/pp_ctl.c
+@@ -1529,6 +1529,12 @@ Perl_dounwind(pTHX_ I32 cxix)
+ switch (CxTYPE(cx)) {
+ case CXt_SUBST:
+ CX_POPSUBST(cx);
++ /* CXt_SUBST is not a block context type, so skip the
++ * cx_popblock(cx) below */
++ if (cxstack_ix == cxix + 1) {
++ cxstack_ix--;
++ return;
++ }
+ break;
+ case CXt_SUB:
+ cx_popsub(cx);
+diff --git a/t/re/subst.t b/t/re/subst.t
+index 26a78c7..c039cc4 100644
+--- a/t/re/subst.t
++++ b/t/re/subst.t
+@@ -11,7 +11,7 @@ BEGIN {
+ require './loc_tools.pl';
+ }
+
+-plan( tests => 270 );
++plan( tests => 271 );
+
+ $_ = 'david';
+ $a = s/david/rules/r;
+@@ -1102,3 +1102,18 @@ SKIP: {
+ $s =~ s/..\G//g;
+ is($s, "\x{123}", "#RT 126260 gofs");
+ }
++
++# [perl #130188] crash on return from substitution in subroutine
++# make sure returning from s///e doesn't SEGV
++{
++ my $f = sub {
++ my $x = 'a';
++ $x =~ s/./return;/e;
++ };
++ my $x = $f->();
++ pass("RT #130188");
++}
++
++
++
++
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index 93fc725..5d598f3 100644
--- a/perl.spec
+++ b/perl.spec
@@ -223,6 +223,10 @@ Patch58: perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.p
# RT130098
Patch59: perl-5.25.7-Fix-Storable-segfaults.patch
+# Fix crash on explicit return from regular expression substitution, RT#130188,
+# in upstream after 5.25.7
+Patch60: perl-5.24.0-crash-on-explicit-return-from-s-e.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
@@ -2908,6 +2912,7 @@ Perl extension for Version Objects
%patch57 -p1
%patch58 -p1
%patch59 -p1
+%patch60 -p1
%patch200 -p1
%patch201 -p1
@@ -2958,6 +2963,7 @@ perl -x patchlevel.h \
'Fedora Patch57: Avoid infinite loop in h2xs tool if enum and type have the same name (RT130001)' \
'Fedora Patch58: Fix stack handling when calling chdir without an argument (RT#129130)' \
'Fedora Patch59: Fix crash in Storable when deserializing malformed code reference (RT#68348, RT#130098)' \
+ 'Fedora Patch60: Fix crash on explicit return from regular expression substitution (RT#130188)' \
'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}
@@ -5239,6 +5245,7 @@ popd
* Mon Nov 28 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-381
- Fix crash in Storable when deserializing malformed code reference
(RT#68348, RT#130098)
+- Fix crash on explicit return from regular expression substitution (RT#130188)
* Wed Nov 09 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-380
- Tie perl-Errno release to interpreter build because of kernel version check
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=41b63f733...
7 years, 4 months
ppisar pushed to perl (master). "Fix crash in Storable when
deserializing malformed code reference"
by notifications@fedoraproject.org
From 2a293b37996e3ccd2fdfcbafa0d1a9460b5bd599 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Mon, 28 Nov 2016 13:42:21 +0100
Subject: Fix crash in Storable when deserializing malformed code reference
---
perl-5.25.7-Fix-Storable-segfaults.patch | 61 ++++++++++++++++++++++++++++++++
perl.spec | 12 ++++++-
2 files changed, 72 insertions(+), 1 deletion(-)
create mode 100644 perl-5.25.7-Fix-Storable-segfaults.patch
diff --git a/perl-5.25.7-Fix-Storable-segfaults.patch b/perl-5.25.7-Fix-Storable-segfaults.patch
new file mode 100644
index 0000000..8934a13
--- /dev/null
+++ b/perl-5.25.7-Fix-Storable-segfaults.patch
@@ -0,0 +1,61 @@
+From fecd3be8dbdb747b9cbf4cbb9299ce40faabc8e6 Mon Sep 17 00:00:00 2001
+From: John Lightsey <lightsey(a)debian.org>
+Date: Mon, 14 Nov 2016 11:56:15 +0100
+Subject: [PATCH] Fix Storable segfaults.
+
+Fix a null pointed dereference segfault in storable when the
+retrieve_code logic was unable to read the string that contained
+the code.
+
+Also fix several locations where retrieve_other was called with a
+null context pointer. This also resulted in a null pointer
+dereference.
+---
+ dist/Storable/Storable.xs | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
+index 053951c..caa489c 100644
+--- a/dist/Storable/Storable.xs
++++ b/dist/Storable/Storable.xs
+@@ -5647,6 +5647,10 @@ static SV *retrieve_code(pTHX_ stcxt_t *cxt, const char *cname)
+ CROAK(("Unexpected type %d in retrieve_code\n", type));
+ }
+
++ if (!text) {
++ CROAK(("Unable to retrieve code\n"));
++ }
++
+ /*
+ * prepend "sub " to the source
+ */
+@@ -5767,7 +5771,7 @@ static SV *old_retrieve_array(pTHX_ stcxt_t *cxt, const char *cname)
+ continue; /* av_extend() already filled us with undef */
+ }
+ if (c != SX_ITEM)
+- (void) retrieve_other(aTHX_ (stcxt_t *) 0, 0); /* Will croak out */
++ (void) retrieve_other(aTHX_ cxt, 0); /* Will croak out */
+ TRACEME(("(#%d) item", i));
+ sv = retrieve(aTHX_ cxt, 0); /* Retrieve item */
+ if (!sv)
+@@ -5844,7 +5848,7 @@ static SV *old_retrieve_hash(pTHX_ stcxt_t *cxt, const char *cname)
+ if (!sv)
+ return (SV *) 0;
+ } else
+- (void) retrieve_other(aTHX_ (stcxt_t *) 0, 0); /* Will croak out */
++ (void) retrieve_other(aTHX_ cxt, 0); /* Will croak out */
+
+ /*
+ * Get key.
+@@ -5855,7 +5859,7 @@ static SV *old_retrieve_hash(pTHX_ stcxt_t *cxt, const char *cname)
+
+ GETMARK(c);
+ if (c != SX_KEY)
+- (void) retrieve_other(aTHX_ (stcxt_t *) 0, 0); /* Will croak out */
++ (void) retrieve_other(aTHX_ cxt, 0); /* Will croak out */
+ RLEN(size); /* Get key size */
+ KBUFCHK((STRLEN)size); /* Grow hash key read pool if needed */
+ if (size)
+--
+2.10.2
+
diff --git a/perl.spec b/perl.spec
index faad7f7..93fc725 100644
--- a/perl.spec
+++ b/perl.spec
@@ -28,7 +28,7 @@
Name: perl
Version: %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
-Release: 380%{?dist}
+Release: 381%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@@ -219,6 +219,10 @@ Patch57: perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch
# in upstream after 5.25.6
Patch58: perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.patch
+# Fix crash in Storable when deserializing malformed code reference, RT#68348,
+# RT130098
+Patch59: perl-5.25.7-Fix-Storable-segfaults.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
@@ -2903,6 +2907,7 @@ Perl extension for Version Objects
%patch56 -p1
%patch57 -p1
%patch58 -p1
+%patch59 -p1
%patch200 -p1
%patch201 -p1
@@ -2952,6 +2957,7 @@ perl -x patchlevel.h \
'Fedora Patch56: Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)' \
'Fedora Patch57: Avoid infinite loop in h2xs tool if enum and type have the same name (RT130001)' \
'Fedora Patch58: Fix stack handling when calling chdir without an argument (RT#129130)' \
+ 'Fedora Patch59: Fix crash in Storable when deserializing malformed code reference (RT#68348, RT#130098)' \
'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}
@@ -5230,6 +5236,10 @@ popd
# Old changelog entries are preserved in CVS.
%changelog
+* Mon Nov 28 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-381
+- Fix crash in Storable when deserializing malformed code reference
+ (RT#68348, RT#130098)
+
* Wed Nov 09 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-380
- Tie perl-Errno release to interpreter build because of kernel version check
(bug #1393421)
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=2a293b379...
7 years, 4 months
ppisar pushed to perl (master). "Tighten dependencies between
architecture specific sub-packages to ISA"
by notifications@fedoraproject.org
From 8da6077616c4476d6332dcc509b5851619357857 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Mon, 28 Nov 2016 14:54:45 +0100
Subject: Tighten dependencies between architecture specific sub-packages to
ISA
---
perl.spec | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/perl.spec b/perl.spec
index 5d598f3..a47eacc 100644
--- a/perl.spec
+++ b/perl.spec
@@ -280,7 +280,7 @@ Provides: perl(perl5db.pl)
# suidperl isn't created by upstream since 5.12.0
Obsoletes: perl-suidperl <= 4:5.12.2
-Requires: perl-libs = %{perl_epoch}:%{perl_version}-%{release}
+Requires: perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
# Require this till perl sub-package requires any modules
Requires: %perl_compat
%if %{defined perl_bootstrap}
@@ -374,7 +374,7 @@ Requires: systemtap-sdt-devel
Requires: perl(ExtUtils::ParseXS)
Requires: %perl_compat
# Match library and header files when downgrading releases
-Requires: perl-libs = %{perl_epoch}:%{perl_version}-%{release}
+Requires: perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
%if %{defined perl_bootstrap}
%gendep_perl_devel
%endif
@@ -450,8 +450,8 @@ License: GPL+ or Artistic
Epoch: 0
Version: %{perl_version}
Requires: %perl_compat
-Requires: perl-libs = %{perl_epoch}:%{perl_version}-%{release}
-Requires: perl-devel = %{perl_epoch}:%{perl_version}-%{release}
+Requires: perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
+Requires: perl-devel%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
Requires: perl-macros
Requires: perl-utils
%if %{defined perl_bootstrap}
@@ -1146,7 +1146,7 @@ Version: 1.25
Requires: %perl_compat
# Errno.pm bakes in kernel version at build time and compares it against
# $Config{osvers} at run time. Match exact interpreter build. Bug #1393421.
-Requires: perl-libs = %{perl_epoch}:%{perl_version}-%{release}
+Requires: perl-libs%{?_isa} = %{perl_epoch}:%{perl_version}-%{release}
Requires: perl(Carp)
%if %{defined perl_bootstrap}
%gendep_perl_Errno
@@ -5246,6 +5246,7 @@ popd
- Fix crash in Storable when deserializing malformed code reference
(RT#68348, RT#130098)
- Fix crash on explicit return from regular expression substitution (RT#130188)
+- Tighten dependencies between architecture specific sub-packages to ISA
* Wed Nov 09 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-380
- Tie perl-Errno release to interpreter build because of kernel version check
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=8da607761...
7 years, 4 months
ppisar pushed to perl (master). "Document
perl-129130-make-chdir-allocate-the-stack-it-needs.patch patch"
by notifications@fedoraproject.org
From 592810058abf7a17f6ce904d181158dc85119ea7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Mon, 28 Nov 2016 14:19:02 +0100
Subject: Document perl-129130-make-chdir-allocate-the-stack-it-needs.patch
patch
---
perl.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/perl.spec b/perl.spec
index 497699d..faad7f7 100644
--- a/perl.spec
+++ b/perl.spec
@@ -215,7 +215,8 @@ Patch56: perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under
# RT#130001, in upstream after 5.25.6
Patch57: perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch
-# Fix stack handling when calling chdir without an argument, RT#129130
+# Fix stack handling when calling chdir without an argument, RT#129130,
+# in upstream after 5.25.6
Patch58: perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.patch
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=592810058...
7 years, 4 months