RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/perl#3fab80b10b31b8e975e664ad465cf3be12ed11b4
This commit is contained in:
parent
500a208fa3
commit
04ebf38f44
@ -0,0 +1,76 @@
|
||||
From e050064b67c501e9fdc7bc3f513ba2b8b9e795f8 Mon Sep 17 00:00:00 2001
|
||||
From: David Mitchell <davem@iabyn.com>
|
||||
Date: Fri, 30 Oct 2020 20:50:58 +0000
|
||||
Subject: [PATCH] Perl_custom_op_get_field(): remove undef behaviour
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Thus function has a couple a switches with
|
||||
|
||||
default:
|
||||
NOT_REACHED; /* NOTREACHED */
|
||||
|
||||
but clang is complaining that the value returned by the function is
|
||||
undefined if those default branches are taken, since the 'any' variable
|
||||
doesn't get set in that path.
|
||||
|
||||
Replace the NOTREACHED with a croak("panic: ..."). It's possible (albeit
|
||||
not intended) for Perl_custom_op_get_field() to be called with a 'field'
|
||||
arg which triggers the default case. So if this ever happens, make it
|
||||
clear that something has gone wrong, rather than just silently
|
||||
continuing on non-debugging builds.
|
||||
|
||||
In any case, this shuts up clang.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
op.c | 14 ++++++--------
|
||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/op.c b/op.c
|
||||
index c30c6b7c8f..2933e2ed7d 100644
|
||||
--- a/op.c
|
||||
+++ b/op.c
|
||||
@@ -18100,6 +18100,7 @@ Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field)
|
||||
else
|
||||
xop = INT2PTR(XOP *, SvIV(HeVAL(he)));
|
||||
}
|
||||
+
|
||||
{
|
||||
XOPRETANY any;
|
||||
if(field == XOPe_xop_ptr) {
|
||||
@@ -18121,7 +18122,10 @@ Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field)
|
||||
any.xop_peep = xop->xop_peep;
|
||||
break;
|
||||
default:
|
||||
- NOT_REACHED; /* NOTREACHED */
|
||||
+ field_panic:
|
||||
+ Perl_croak(aTHX_
|
||||
+ "panic: custom_op_get_field(): invalid field %d\n",
|
||||
+ (int)field);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -18139,17 +18143,11 @@ Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field)
|
||||
any.xop_peep = XOPd_xop_peep;
|
||||
break;
|
||||
default:
|
||||
- NOT_REACHED; /* NOTREACHED */
|
||||
+ goto field_panic;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
- /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
|
||||
- * op.c: In function 'Perl_custom_op_get_field':
|
||||
- * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
|
||||
- * This is because on those platforms (with -DEBUGGING) NOT_REACHED
|
||||
- * expands to assert(0), which expands to ((0) ? (void)0 :
|
||||
- * __assert(...)), and gcc doesn't know that __assert can never return. */
|
||||
return any;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.4
|
||||
|
@ -0,0 +1,57 @@
|
||||
From f877e124a20d4f94c82c36e6b7a99b4e9663e204 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Cook <tony@develop-help.com>
|
||||
Date: Tue, 10 Nov 2020 15:50:27 +1100
|
||||
Subject: [PATCH] fetch magic on the first stacked filetest, not the last
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
fixes #18293
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
pp_sys.c | 2 +-
|
||||
t/op/filetest.t | 10 +++++++++-
|
||||
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pp_sys.c b/pp_sys.c
|
||||
index 66c5d9aade..5c9f768eaf 100644
|
||||
--- a/pp_sys.c
|
||||
+++ b/pp_sys.c
|
||||
@@ -3067,7 +3067,7 @@ S_try_amagic_ftest(pTHX_ char chr) {
|
||||
SV *const arg = *PL_stack_sp;
|
||||
|
||||
assert(chr != '?');
|
||||
- if (!(PL_op->op_private & OPpFT_STACKING)) SvGETMAGIC(arg);
|
||||
+ if (!(PL_op->op_private & OPpFT_STACKED)) SvGETMAGIC(arg);
|
||||
|
||||
if (SvAMAGIC(arg))
|
||||
{
|
||||
diff --git a/t/op/filetest.t b/t/op/filetest.t
|
||||
index fe9724c59a..7c471c050c 100644
|
||||
--- a/t/op/filetest.t
|
||||
+++ b/t/op/filetest.t
|
||||
@@ -9,7 +9,7 @@ BEGIN {
|
||||
set_up_inc(qw '../lib ../cpan/Perl-OSType/lib');
|
||||
}
|
||||
|
||||
-plan(tests => 57 + 27*14);
|
||||
+plan(tests => 58 + 27*14);
|
||||
|
||||
if ($^O =~ /MSWin32|cygwin|msys/ && !is_miniperl) {
|
||||
require Win32; # for IsAdminUser()
|
||||
@@ -385,3 +385,11 @@ SKIP: {
|
||||
ok(!-f "TEST\0-", '-f on name with \0');
|
||||
ok(!-r "TEST\0-", '-r on name with \0');
|
||||
}
|
||||
+
|
||||
+{
|
||||
+ # github #18293
|
||||
+ "" =~ /(.*)/;
|
||||
+ my $x = $1; # call magic on $1, setting the pv to ""
|
||||
+ "test.pl" =~ /(.*)/;
|
||||
+ ok(-f -r $1, "stacked handles on a name with magic");
|
||||
+}
|
||||
--
|
||||
2.25.4
|
||||
|
@ -0,0 +1,71 @@
|
||||
From b52b6c4029b51818442d64c6104d26e12e140f09 Mon Sep 17 00:00:00 2001
|
||||
From: TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com>
|
||||
Date: Thu, 5 Nov 2020 22:06:16 +0900
|
||||
Subject: [PATCH] t/op/inc.t, t/op/hexfp.t, t/op/sprintf2.t: Add missing d_
|
||||
prefixes for Config variable names.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
t/op/hexfp.t | 2 +-
|
||||
t/op/inc.t | 4 ++--
|
||||
t/op/sprintf2.t | 4 ++--
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/t/op/hexfp.t b/t/op/hexfp.t
|
||||
index b0c85cfdc6..5fb80d3d74 100644
|
||||
--- a/t/op/hexfp.t
|
||||
+++ b/t/op/hexfp.t
|
||||
@@ -246,7 +246,7 @@ SKIP: {
|
||||
skip("non-80-bit-long-double", 4)
|
||||
unless ($Config{uselongdouble} &&
|
||||
($Config{nvsize} == 16 || $Config{nvsize} == 12) &&
|
||||
- ($Config{long_double_style_ieee_extended}));
|
||||
+ ($Config{d_long_double_style_ieee_extended}));
|
||||
is(0x1p-1074, 4.94065645841246544e-324);
|
||||
is(0x1p-1075, 2.47032822920623272e-324, '[perl #128919]');
|
||||
is(0x1p-1076, 1.23516411460311636e-324);
|
||||
diff --git a/t/op/inc.t b/t/op/inc.t
|
||||
index 0bb8b85b13..3d5cc024d3 100644
|
||||
--- a/t/op/inc.t
|
||||
+++ b/t/op/inc.t
|
||||
@@ -188,10 +188,10 @@ cmp_ok($a, '==', 2147483647, "postdecrement properly downgrades from double");
|
||||
|
||||
SKIP: {
|
||||
if ($Config{uselongdouble} &&
|
||||
- ($Config{long_double_style_ieee_doubledouble})) {
|
||||
+ ($Config{d_long_double_style_ieee_doubledouble})) {
|
||||
skip "the double-double format is weird", 1;
|
||||
}
|
||||
- unless ($Config{double_style_ieee}) {
|
||||
+ unless ($Config{d_double_style_ieee}) {
|
||||
skip "the doublekind $Config{doublekind} is not IEEE", 1;
|
||||
}
|
||||
|
||||
diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t
|
||||
index bbc12ccd0a..38a550c281 100644
|
||||
--- a/t/op/sprintf2.t
|
||||
+++ b/t/op/sprintf2.t
|
||||
@@ -701,7 +701,7 @@ SKIP: {
|
||||
skip("uselongdouble=" . ($Config{uselongdouble} ? 'define' : 'undef')
|
||||
. " longdblkind=$Config{longdblkind} os=$^O", 6)
|
||||
unless ($Config{uselongdouble} &&
|
||||
- ($Config{long_double_style_ieee_doubledouble})
|
||||
+ ($Config{d_long_double_style_ieee_doubledouble})
|
||||
# Gating on 'linux' (ppc) here is due to the differing
|
||||
# double-double implementations: other (also big-endian)
|
||||
# double-double platforms (e.g. AIX on ppc or IRIX on mips)
|
||||
@@ -892,7 +892,7 @@ SKIP: {
|
||||
skip("non-80-bit-long-double", 17)
|
||||
unless ($Config{uselongdouble} &&
|
||||
($Config{nvsize} == 16 || $Config{nvsize} == 12) &&
|
||||
- ($Config{long_double_style_ieee_extended}));
|
||||
+ ($Config{d_long_double_style_ieee_extended}));
|
||||
|
||||
{
|
||||
# The last normal for this format.
|
||||
--
|
||||
2.25.4
|
||||
|
26
perl.spec
26
perl.spec
@ -100,7 +100,7 @@ License: GPL+ or Artistic
|
||||
Epoch: %{perl_epoch}
|
||||
Version: %{perl_version}
|
||||
# release number must be even higher, because dual-lived modules will be broken otherwise
|
||||
Release: 465%{?dist}
|
||||
Release: 466%{?dist}
|
||||
Summary: Practical Extraction and Report Language
|
||||
Url: https://www.perl.org/
|
||||
Source0: https://www.cpan.org/src/5.0/perl-%{perl_version}.tar.xz
|
||||
@ -255,6 +255,17 @@ Patch39: perl-5.33.2-mro.xs-Fix-compiler-warning.patch
|
||||
# Fix a code flow in Perl_sv_inc_nomg(), in upstream after 5.33.2
|
||||
Patch40: perl-5.33.2-sv.c-Added-missing-braces-in-Perl_sv_inc_nomg.patch
|
||||
|
||||
# Fix un undefined behavior in Perl_custom_op_get_field(),
|
||||
# in upstream after 5.33.3
|
||||
Patch41: perl-5.33.3-Perl_custom_op_get_field-remove-undef-behaviour.patch
|
||||
|
||||
# Fix Config variable names in in t/op tests, in upstream after 5.33.3
|
||||
Patch42: perl-5.33.3-t-op-inc.t-t-op-hexfp.t-t-op-sprintf2.t-Add-missing-.patch
|
||||
|
||||
# Fix fetching a magic on the stacked file test operators,
|
||||
# in upstream after 5.33.3
|
||||
Patch43: perl-5.33.3-fetch-magic-on-the-first-stacked-filetest-not-the-la.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
|
||||
|
||||
@ -4006,7 +4017,7 @@ and localtime () functions.
|
||||
%package Time-HiRes
|
||||
Summary: High resolution alarm, sleep, gettimeofday, interval timers
|
||||
License: GPL+ or Artistic
|
||||
Epoch: 0
|
||||
Epoch: 4
|
||||
Version: 1.9764
|
||||
Requires: %perl_compat
|
||||
Requires: perl(Carp)
|
||||
@ -4297,6 +4308,9 @@ you're not running VMS, this module does nothing.
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
%patch41 -p1
|
||||
%patch42 -p1
|
||||
%patch43 -p1
|
||||
%patch200 -p1
|
||||
%patch201 -p1
|
||||
|
||||
@ -4344,6 +4358,9 @@ perl -x patchlevel.h \
|
||||
'Fedora Patch38: Fix sv_collxfrm macro to respect locale' \
|
||||
'Fedora Patch39: Fix an iterator signedness in handling a mro exception (GH#18155)' \
|
||||
'Fedora Patch40: Fix a code flow in Perl_sv_inc_nomg()' \
|
||||
'Fedora Patch41: Fix un undefined behavior in Perl_custom_op_get_field()' \
|
||||
'Fedora Patch42: Fix Config variable names in in t/op tests' \
|
||||
'Fedora Patch43: Fix fetching a magic on the stacked file test operators' \
|
||||
'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}
|
||||
@ -7062,6 +7079,11 @@ popd
|
||||
|
||||
# Old changelog entries are preserved in CVS.
|
||||
%changelog
|
||||
* Thu Nov 12 2020 Petr Pisar <ppisar@redhat.com> - 4:5.32.0-466
|
||||
- Fix un undefined behavior in Perl_custom_op_get_field()
|
||||
- Fix Config variable names in in t/op tests
|
||||
- Fix fetching a magic on the stacked file test operators
|
||||
|
||||
* Wed Oct 14 2020 Petr Pisar <ppisar@redhat.com> - 4:5.32.0-465
|
||||
- Fix sv_collxfrm macro to respect locale
|
||||
- Fix an iterator signedness in handling a mro exception (GH#18155)
|
||||
|
Loading…
Reference in New Issue
Block a user