Compare commits
No commits in common. "master" and "openEuler1.0" have entirely different histories.
master
...
openEuler1
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +0,0 @@
|
|||||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
[lfs]
|
|
||||||
url = https://artlfs.openeuler.openatom.cn/src-openEuler/perl
|
|
||||||
10
CVE-2018-18312-1.patch
Normal file
10
CVE-2018-18312-1.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/regcomp.c 2018-05-21 20:29:23.000000000 +0800
|
||||||
|
+++ b/regcomp-change.c 2019-04-11 09:51:08.493000000 +0800
|
||||||
|
@@ -15591,7 +15591,6 @@ redo_curchar:
|
||||||
|
if (UCHARAT(RExC_parse) != ')')
|
||||||
|
vFAIL("Expecting close paren for wrapper for nested extended charclass");
|
||||||
|
|
||||||
|
- RExC_parse++;
|
||||||
|
RExC_flags = save_flags;
|
||||||
|
goto handle_operand;
|
||||||
|
}
|
||||||
11
CVE-2018-18312-2.patch
Normal file
11
CVE-2018-18312-2.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/t/re/reg_mesg.t 2018-05-21 20:29:23.000000000 +0800
|
||||||
|
+++ b/t/re/reg_mesg-change.t 2019-04-11 09:54:59.622000000 +0800
|
||||||
|
@@ -122,6 +122,8 @@ my $tab_hex = sprintf "%02X", ord("\t");
|
||||||
|
#
|
||||||
|
# The first set are those that should be fatal errors.
|
||||||
|
|
||||||
|
+my $bug133423 = "(?[(?^:(?[\\\x00]))\\]\x00|2[^^]\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80])R.\\670";
|
||||||
|
+
|
||||||
|
my @death =
|
||||||
|
(
|
||||||
|
'/[[=foo=]]/' => 'POSIX syntax [= =] is reserved for future extensions {#} m/[[=foo=]{#}]/',
|
||||||
10
CVE-2018-18312-3.patch
Normal file
10
CVE-2018-18312-3.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/t/re/reg_mesg-change.t 2019-04-11 10:07:36.626000000 +0800
|
||||||
|
+++ b/t/re/reg_mesg.t 2019-04-11 10:08:20.032000000 +0800
|
||||||
|
@@ -309,6 +309,7 @@ my @death =
|
||||||
|
'/\A{/' => 'Unescaped left brace in regex is illegal here {#} m/\A{{#}/',
|
||||||
|
'/(?<=/' => 'Sequence (?... not terminated {#} m/(?<={#}/', # [perl #128170]
|
||||||
|
'/\p{vertical tab}/' => 'Can\'t find Unicode property definition "vertical tab" {#} m/\\p{vertical tab}{#}/', # [perl #132055]
|
||||||
|
+ "/$bug133423/" => "Operand with no preceding operator {#} m/(?[(?^:(?[\\\0]))\\{#}]\0|2[^^]\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80])R.\\670/",
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
93
Fix-script-run-bug-1-followed-by-Thai-digit.patch
Normal file
93
Fix-script-run-bug-1-followed-by-Thai-digit.patch
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
From 7da8e27b9d7d2be4e770d074405ddb9941e6c8b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Thu, 16 Aug 2018 16:14:01 -0600
|
||||||
|
Subject: [PATCH] Fix script run bug '1' followed by Thai digit
|
||||||
|
|
||||||
|
This does not have a ticket, but was pointed out in
|
||||||
|
http://nntp.perl.org/group/perl.perl5.porters/251870
|
||||||
|
|
||||||
|
The logic for deciding if it was needed to check if a character is a
|
||||||
|
digit was flawed.
|
||||||
|
---
|
||||||
|
regexec.c | 46 +++++++++++++++++++++++++++++++---------------
|
||||||
|
t/re/script_run.t | 5 +++++
|
||||||
|
2 files changed, 36 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/regexec.c b/regexec.c
|
||||||
|
index 6f39670c4a..c927abc611 100644
|
||||||
|
--- a/regexec.c
|
||||||
|
+++ b/regexec.c
|
||||||
|
@@ -10626,23 +10626,39 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
|
||||||
|
scripts_match:
|
||||||
|
|
||||||
|
/* Here, the script of the character is compatible with that of the
|
||||||
|
- * run. Either they match exactly, or one or both can be any of
|
||||||
|
- * several scripts, and the intersection is not empty. If the
|
||||||
|
- * character is not a decimal digit, we are done with it. Otherwise,
|
||||||
|
- * it could still fail if it is from a different set of 10 than seen
|
||||||
|
- * already (or we may not have seen any, and we need to set the
|
||||||
|
- * sequence). If we have determined a single script and that script
|
||||||
|
- * only has one set of digits (almost all scripts are like that), then
|
||||||
|
- * this isn't a problem, as any digit must come from the same sequence.
|
||||||
|
- * The only scripts that have multiple sequences have been constructed
|
||||||
|
- * to be 0 in 'script_zeros[]'.
|
||||||
|
+ * run. That means that in most cases, it continues the script run.
|
||||||
|
+ * Either it and the run match exactly, or one or both can be in any of
|
||||||
|
+ * several scripts, and the intersection is not empty. But if the
|
||||||
|
+ * character is a decimal digit, we need further handling. If we
|
||||||
|
+ * haven't seen a digit before, it would establish what set of 10 all
|
||||||
|
+ * must come from; and if we have established a set, we need to check
|
||||||
|
+ * that this is in it.
|
||||||
|
*
|
||||||
|
- * Here we check if it is a digit. */
|
||||||
|
+ * But there are cases we can rule out without having to look up if
|
||||||
|
+ * this is a digit:
|
||||||
|
+ * a. All instances of [0-9] have been dealt with earlier.
|
||||||
|
+ * b. The next digit encoded by Unicode is 1600 code points further
|
||||||
|
+ * on, so if the code point in this loop iteration is less than
|
||||||
|
+ * that, it isn't a digit.
|
||||||
|
+ * c. Most scripts that have digits have a single set of 10. If
|
||||||
|
+ * we've encountered a digit in such a script, 'zero_of_run' is
|
||||||
|
+ * set to the code point (call it z) whose numeric value is 0.
|
||||||
|
+ * If the code point in this loop iteration is in the range
|
||||||
|
+ * z..z+9, it is in the script's set of 10, and we've actually
|
||||||
|
+ * handled it earlier in this function and won't reach this
|
||||||
|
+ * point. But, code points in that script that aren't in that
|
||||||
|
+ * range can't be digits, so we don't have to look any such up.
|
||||||
|
+ * We can tell if this script is such a one by looking at
|
||||||
|
+ * 'script_zeros[]' for it. It is non-zero iff it has a single
|
||||||
|
+ * set of digits. This rule doesn't apply if we haven't narrowed
|
||||||
|
+ * down the possible scripts to a single one yet. Nor if the
|
||||||
|
+ * zero of the run is '0', as that also hasn't narrowed things
|
||||||
|
+ * down completely */
|
||||||
|
if ( cp >= FIRST_NON_ASCII_DECIMAL_DIGIT
|
||||||
|
- && ( ( zero_of_run == 0
|
||||||
|
- || ( ( script_of_char >= 0
|
||||||
|
- && script_zeros[script_of_char] == 0)
|
||||||
|
- || intersection))))
|
||||||
|
+ && ( intersection
|
||||||
|
+ || script_of_char < 0 /* Also implies an intersection */
|
||||||
|
+ || zero_of_run == '0'
|
||||||
|
+ || script_zeros[script_of_char] == 0))
|
||||||
|
{
|
||||||
|
SSize_t range_zero_index;
|
||||||
|
range_zero_index = _invlist_search(decimals_invlist, cp);
|
||||||
|
diff --git a/t/re/script_run.t b/t/re/script_run.t
|
||||||
|
index ca234d9d4e..10c71034c4 100644
|
||||||
|
--- a/t/re/script_run.t
|
||||||
|
+++ b/t/re/script_run.t
|
||||||
|
@@ -84,6 +84,11 @@ foreach my $type ('script_run', 'sr', 'atomic_script_run', 'asr') {
|
||||||
|
|
||||||
|
# From UTS 39
|
||||||
|
like("写真だけの結婚式", $script_run, "Mixed Hiragana and Han");
|
||||||
|
+
|
||||||
|
+ unlike "\N{THAI DIGIT FIVE}1", $script_run, "Thai digit followed by '1'";
|
||||||
|
+ unlike "1\N{THAI DIGIT FIVE}", $script_run, "'1' followed by Thai digit ";
|
||||||
|
+ unlike "\N{BENGALI DIGIT ZERO}\N{CHAKMA DIGIT SEVEN}", $script_run,
|
||||||
|
+ "Two digits in same extended script but from different sets of 10";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Until fixed, this was skipping the '['
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
66
Fix-time-local-tests-in-2020.patch
Normal file
66
Fix-time-local-tests-in-2020.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
From 836390962709d5856816807f13a3edfd4aff1fe1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: openEuler Buildteam <buildteam@openeuler.org>
|
||||||
|
Date: Fri, 3 Jan 2020 15:31:48 +0800
|
||||||
|
Subject: [PATCH] Fix time local tests in 2020
|
||||||
|
|
||||||
|
See details at here:https://rt.cpan.org/Public/Bug/Display.html?id=124787
|
||||||
|
---
|
||||||
|
cpan/Time-Local/t/Local.t | 11 +++++------
|
||||||
|
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cpan/Time-Local/t/Local.t b/cpan/Time-Local/t/Local.t
|
||||||
|
index 6341396..e28c6d2 100644
|
||||||
|
--- a/cpan/Time-Local/t/Local.t
|
||||||
|
+++ b/cpan/Time-Local/t/Local.t
|
||||||
|
@@ -96,7 +96,7 @@ SKIP: {
|
||||||
|
|
||||||
|
# Test timelocal()
|
||||||
|
{
|
||||||
|
- my $year_in = $year < 70 ? $year + 1900 : $year;
|
||||||
|
+ my $year_in = $year + 1900;
|
||||||
|
my $time = timelocal( $sec, $min, $hour, $mday, $mon, $year_in );
|
||||||
|
|
||||||
|
my ( $s, $m, $h, $D, $M, $Y ) = localtime($time);
|
||||||
|
@@ -111,7 +111,7 @@ SKIP: {
|
||||||
|
|
||||||
|
# Test timegm()
|
||||||
|
{
|
||||||
|
- my $year_in = $year < 70 ? $year + 1900 : $year;
|
||||||
|
+ my $year_in = $year + 1900;
|
||||||
|
my $time = timegm( $sec, $min, $hour, $mday, $mon, $year_in );
|
||||||
|
|
||||||
|
my ( $s, $m, $h, $D, $M, $Y ) = gmtime($time);
|
||||||
|
@@ -128,7 +128,6 @@ SKIP: {
|
||||||
|
|
||||||
|
for (@bad_time) {
|
||||||
|
my ( $year, $mon, $mday, $hour, $min, $sec ) = @$_;
|
||||||
|
- $year -= 1900;
|
||||||
|
$mon--;
|
||||||
|
|
||||||
|
eval { timegm( $sec, $min, $hour, $mday, $mon, $year ) };
|
||||||
|
@@ -138,19 +137,19 @@ for (@bad_time) {
|
||||||
|
|
||||||
|
{
|
||||||
|
is(
|
||||||
|
- timelocal( 0, 0, 1, 1, 0, 90 ) - timelocal( 0, 0, 0, 1, 0, 90 ), 3600,
|
||||||
|
+ timelocal( 0, 0, 1, 1, 0, 1990 ) - timelocal( 0, 0, 0, 1, 0, 1990 ), 3600,
|
||||||
|
'one hour difference between two calls to timelocal'
|
||||||
|
);
|
||||||
|
|
||||||
|
is(
|
||||||
|
- timelocal( 1, 2, 3, 1, 0, 100 ) - timelocal( 1, 2, 3, 31, 11, 99 ),
|
||||||
|
+ timelocal( 1, 2, 3, 1, 0, 2000 ) - timelocal( 1, 2, 3, 31, 11, 1999 ),
|
||||||
|
24 * 3600,
|
||||||
|
'one day difference between two calls to timelocal'
|
||||||
|
);
|
||||||
|
|
||||||
|
# Diff beween Jan 1, 1980 and Mar 1, 1980 = (31 + 29 = 60 days)
|
||||||
|
is(
|
||||||
|
- timegm( 0, 0, 0, 1, 2, 80 ) - timegm( 0, 0, 0, 1, 0, 80 ),
|
||||||
|
+ timegm( 0, 0, 0, 1, 2, 1980 ) - timegm( 0, 0, 0, 1, 0, 1980 ),
|
||||||
|
60 * 24 * 3600,
|
||||||
|
'60 day difference between two calls to timegm'
|
||||||
|
);
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
175
Perl_my_setenv-handle-integer-wrap.patch
Normal file
175
Perl_my_setenv-handle-integer-wrap.patch
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
From 34716e2a6ee2af96078d62b065b7785c001194be Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Fri, 29 Jun 2018 13:37:03 +0100
|
||||||
|
Subject: [PATCH] Perl_my_setenv(); handle integer wrap
|
||||||
|
|
||||||
|
RT #133204
|
||||||
|
|
||||||
|
Wean this function off int/I32 and onto UV/Size_t.
|
||||||
|
Also, replace all malloc-ish calls with a wrapper that does
|
||||||
|
overflow checks,
|
||||||
|
|
||||||
|
In particular, it was doing (nlen + vlen + 2) which could wrap when
|
||||||
|
the combined length of the environment variable name and value
|
||||||
|
exceeded around 0x7fffffff.
|
||||||
|
|
||||||
|
The wrapper check function is probably overkill, but belt and braces...
|
||||||
|
|
||||||
|
NB this function has several variant parts, #ifdef'ed by platform
|
||||||
|
type; I have blindly changed the parts that aren't compiled under linux.
|
||||||
|
---
|
||||||
|
util.c | 76 ++++++++++++++++++++++++++++++++++++++++------------------
|
||||||
|
1 file changed, 53 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/util.c b/util.c
|
||||||
|
index 7282dd9cfe..c5c7becc0f 100644
|
||||||
|
--- a/util.c
|
||||||
|
+++ b/util.c
|
||||||
|
@@ -2061,8 +2061,40 @@ Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const char *const bits,
|
||||||
|
*(s+(nlen+1+vlen)) = '\0'
|
||||||
|
|
||||||
|
#ifdef USE_ENVIRON_ARRAY
|
||||||
|
- /* VMS' my_setenv() is in vms.c */
|
||||||
|
+
|
||||||
|
+/* small wrapper for use by Perl_my_setenv that mallocs, or reallocs if
|
||||||
|
+ * 'current' is non-null, with up to three sizes that are added together.
|
||||||
|
+ * It handles integer overflow.
|
||||||
|
+ */
|
||||||
|
+static char *
|
||||||
|
+S_env_alloc(void *current, Size_t l1, Size_t l2, Size_t l3, Size_t size)
|
||||||
|
+{
|
||||||
|
+ void *p;
|
||||||
|
+ Size_t sl, l = l1 + l2;
|
||||||
|
+
|
||||||
|
+ if (l < l2)
|
||||||
|
+ goto panic;
|
||||||
|
+ l += l3;
|
||||||
|
+ if (l < l3)
|
||||||
|
+ goto panic;
|
||||||
|
+ sl = l * size;
|
||||||
|
+ if (sl < l)
|
||||||
|
+ goto panic;
|
||||||
|
+
|
||||||
|
+ p = current
|
||||||
|
+ ? safesysrealloc(current, sl)
|
||||||
|
+ : safesysmalloc(sl);
|
||||||
|
+ if (p)
|
||||||
|
+ return (char*)p;
|
||||||
|
+
|
||||||
|
+ panic:
|
||||||
|
+ croak_memory_wrap();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* VMS' my_setenv() is in vms.c */
|
||||||
|
#if !defined(WIN32) && !defined(NETWARE)
|
||||||
|
+
|
||||||
|
void
|
||||||
|
Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
{
|
||||||
|
@@ -2078,28 +2110,27 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
#ifndef PERL_USE_SAFE_PUTENV
|
||||||
|
if (!PL_use_safe_putenv) {
|
||||||
|
/* most putenv()s leak, so we manipulate environ directly */
|
||||||
|
- I32 i;
|
||||||
|
- const I32 len = strlen(nam);
|
||||||
|
- int nlen, vlen;
|
||||||
|
+ UV i;
|
||||||
|
+ Size_t vlen, nlen = strlen(nam);
|
||||||
|
|
||||||
|
/* where does it go? */
|
||||||
|
for (i = 0; environ[i]; i++) {
|
||||||
|
- if (strnEQ(environ[i],nam,len) && environ[i][len] == '=')
|
||||||
|
+ if (strnEQ(environ[i], nam, nlen) && environ[i][nlen] == '=')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (environ == PL_origenviron) { /* need we copy environment? */
|
||||||
|
- I32 j;
|
||||||
|
- I32 max;
|
||||||
|
+ UV j, max;
|
||||||
|
char **tmpenv;
|
||||||
|
|
||||||
|
max = i;
|
||||||
|
while (environ[max])
|
||||||
|
max++;
|
||||||
|
- tmpenv = (char**)safesysmalloc((max+2) * sizeof(char*));
|
||||||
|
+ /* XXX shouldn't that be max+1 rather than max+2 ??? - DAPM */
|
||||||
|
+ tmpenv = (char**)S_env_alloc(NULL, max, 2, 0, sizeof(char*));
|
||||||
|
for (j=0; j<max; j++) { /* copy environment */
|
||||||
|
- const int len = strlen(environ[j]);
|
||||||
|
- tmpenv[j] = (char*)safesysmalloc((len+1)*sizeof(char));
|
||||||
|
+ const Size_t len = strlen(environ[j]);
|
||||||
|
+ tmpenv[j] = S_env_alloc(NULL, len, 1, 0, 1);
|
||||||
|
Copy(environ[j], tmpenv[j], len+1, char);
|
||||||
|
}
|
||||||
|
tmpenv[max] = NULL;
|
||||||
|
@@ -2118,15 +2149,15 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
if (!environ[i]) { /* does not exist yet */
|
||||||
|
- environ = (char**)safesysrealloc(environ, (i+2) * sizeof(char*));
|
||||||
|
+ environ = (char**)S_env_alloc(environ, i, 2, 0, sizeof(char*));
|
||||||
|
environ[i+1] = NULL; /* make sure it's null terminated */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
safesysfree(environ[i]);
|
||||||
|
- nlen = strlen(nam);
|
||||||
|
+
|
||||||
|
vlen = strlen(val);
|
||||||
|
|
||||||
|
- environ[i] = (char*)safesysmalloc((nlen+vlen+2) * sizeof(char));
|
||||||
|
+ environ[i] = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
/* all that work just for this */
|
||||||
|
my_setenv_format(environ[i], nam, nlen, val, vlen);
|
||||||
|
} else {
|
||||||
|
@@ -2150,22 +2181,21 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
if (environ) /* old glibc can crash with null environ */
|
||||||
|
(void)unsetenv(nam);
|
||||||
|
} else {
|
||||||
|
- const int nlen = strlen(nam);
|
||||||
|
- const int vlen = strlen(val);
|
||||||
|
- char * const new_env =
|
||||||
|
- (char*)safesysmalloc((nlen + vlen + 2) * sizeof(char));
|
||||||
|
+ const Size_t nlen = strlen(nam);
|
||||||
|
+ const Size_t vlen = strlen(val);
|
||||||
|
+ char * const new_env = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
my_setenv_format(new_env, nam, nlen, val, vlen);
|
||||||
|
(void)putenv(new_env);
|
||||||
|
}
|
||||||
|
# else /* ! HAS_UNSETENV */
|
||||||
|
char *new_env;
|
||||||
|
- const int nlen = strlen(nam);
|
||||||
|
- int vlen;
|
||||||
|
+ const Size_t nlen = strlen(nam);
|
||||||
|
+ Size_t vlen;
|
||||||
|
if (!val) {
|
||||||
|
val = "";
|
||||||
|
}
|
||||||
|
vlen = strlen(val);
|
||||||
|
- new_env = (char*)safesysmalloc((nlen + vlen + 2) * sizeof(char));
|
||||||
|
+ new_env = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
/* all that work just for this */
|
||||||
|
my_setenv_format(new_env, nam, nlen, val, vlen);
|
||||||
|
(void)putenv(new_env);
|
||||||
|
@@ -2187,14 +2217,14 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
{
|
||||||
|
dVAR;
|
||||||
|
char *envstr;
|
||||||
|
- const int nlen = strlen(nam);
|
||||||
|
- int vlen;
|
||||||
|
+ const Size_t nlen = strlen(nam);
|
||||||
|
+ Size_t vlen;
|
||||||
|
|
||||||
|
if (!val) {
|
||||||
|
val = "";
|
||||||
|
}
|
||||||
|
vlen = strlen(val);
|
||||||
|
- Newx(envstr, nlen+vlen+2, char);
|
||||||
|
+ envstr = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
my_setenv_format(envstr, nam, nlen, val, vlen);
|
||||||
|
(void)PerlEnv_putenv(envstr);
|
||||||
|
Safefree(envstr);
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
README for perl-macros
|
|
||||||
|
|
||||||
Author: Christian Wittmer <chris@computersalat.de>
|
|
||||||
|
|
||||||
|
|
||||||
%perl_gen_filelist generates an rpmlint happy filelist of your installed files
|
|
||||||
|
|
||||||
In most cases you only need to check the %doc part
|
|
||||||
sometimes there is a "Changes" or "ChangeLog",....
|
|
||||||
|
|
||||||
Requirements for %perl_gen_filelist
|
|
||||||
You have to define following parts inside your spec file
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
BuildRequires: perl-macros
|
|
||||||
|
|
||||||
%install
|
|
||||||
%perl_make_install
|
|
||||||
%perl_process_packlist
|
|
||||||
%perl_gen_filelist
|
|
||||||
|
|
||||||
%files -f %{name}.files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc Changes README
|
|
||||||
|
|
||||||
|
|
||||||
And here an Example of the generated filelist:
|
|
||||||
|
|
||||||
%dir /usr/lib/perl5/vendor_perl/5.8.8/Algorithm
|
|
||||||
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/DiffOld.pm
|
|
||||||
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/diff.pl
|
|
||||||
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/Diff.pm
|
|
||||||
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/diffnew.pl
|
|
||||||
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/cdiff.pl
|
|
||||||
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/htmldiff.pl
|
|
||||||
%dir /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm
|
|
||||||
%dir /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm/Diff
|
|
||||||
/usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm/Diff/.packlist
|
|
||||||
/usr/share/man/man?/*
|
|
||||||
/var/adm/perl-modules/perl-Algorithm-Diff
|
|
||||||
|
|
||||||
49
Time-HiRes-t-itimer.t-avoid-race-condition.patch
Normal file
49
Time-HiRes-t-itimer.t-avoid-race-condition.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From ecbf46993f6ffbdc255f6ded3c6c05a8266a71e8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Tue, 7 Aug 2018 12:26:31 +0100
|
||||||
|
Subject: [PATCH] Time-HiRes/t/itimer.t: avoid race condition.
|
||||||
|
|
||||||
|
This test script sets a repeating interval timer going, and after 4
|
||||||
|
'ticks' (SIGVTALRM), disables the timer (by setting it to zero).
|
||||||
|
|
||||||
|
The main loop which does CPU burning, does a getitmer() every now and
|
||||||
|
again, and when the value is zero, assumes the signal handler has
|
||||||
|
disabled the timer, and so finishes.
|
||||||
|
|
||||||
|
The trouble was that it was checking the 'time left', which can reach
|
||||||
|
zero because the interval timer has counted down to zero, and the signal
|
||||||
|
handler is about to be called, but the interval hasn't been reset back
|
||||||
|
to 0.4s yet.
|
||||||
|
|
||||||
|
i.e. the code doesn't distinguish between "timer disabled" and "timer
|
||||||
|
just reached zero".
|
||||||
|
|
||||||
|
In that scenario, the cleanup code in the test script disables the
|
||||||
|
SIGVTALRM handler while the timer is still active, and so the process
|
||||||
|
gets killed if another signal is raised.
|
||||||
|
|
||||||
|
This commit changes the test to check the second value returned by
|
||||||
|
getitmer() for being zero rather than the first - the second being the
|
||||||
|
repeat interval, whichb is always 0.4 until the timer is disabled.
|
||||||
|
---
|
||||||
|
dist/Time-HiRes/t/itimer.t | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dist/Time-HiRes/t/itimer.t b/dist/Time-HiRes/t/itimer.t
|
||||||
|
index e196b1648c..432b224488 100644
|
||||||
|
--- a/dist/Time-HiRes/t/itimer.t
|
||||||
|
+++ b/dist/Time-HiRes/t/itimer.t
|
||||||
|
@@ -51,7 +51,9 @@ ok(defined $virt && abs($virt / 0.5) - 1 < $limit,
|
||||||
|
printf("# getitimer: %s\n", join(" ",
|
||||||
|
Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL)));
|
||||||
|
|
||||||
|
-while (Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL)) {
|
||||||
|
+# burn CPU until the VTALRM signal handler sets the repeat interval to
|
||||||
|
+# zero, indicating that the timer has fired 4 times.
|
||||||
|
+while ((Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL))[1]) {
|
||||||
|
my $j;
|
||||||
|
for (1..1000) { $j++ } # Can't be unbreakable, must test getitimer().
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
184
Update-Time-Piece-to-CPAN-version-1.33.patch
Normal file
184
Update-Time-Piece-to-CPAN-version-1.33.patch
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
From 9d890beed61e079102335ef5859d652b4e2c32ac Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
||||||
|
Date: Mon, 20 Aug 2018 11:15:20 +0100
|
||||||
|
Subject: [PATCH] Update Time-Piece to CPAN version 1.33
|
||||||
|
|
||||||
|
[DELTA]
|
||||||
|
|
||||||
|
1.33 2018-08-18
|
||||||
|
- Allow objects in overloaded methods
|
||||||
|
---
|
||||||
|
Porting/Maintainers.pl | 2 +-
|
||||||
|
cpan/Time-Piece/Piece.pm | 40 ++++++++++++++++++++--------------
|
||||||
|
cpan/Time-Piece/Seconds.pm | 2 +-
|
||||||
|
cpan/Time-Piece/t/06subclass.t | 15 +++++++++++++
|
||||||
|
4 files changed, 41 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
|
||||||
|
index eaf9ed3262..a137ee9483 100755
|
||||||
|
--- a/Porting/Maintainers.pl
|
||||||
|
+++ b/Porting/Maintainers.pl
|
||||||
|
@@ -1208,7 +1208,7 @@ use File::Glob qw(:case);
|
||||||
|
},
|
||||||
|
|
||||||
|
'Time::Piece' => {
|
||||||
|
- 'DISTRIBUTION' => 'ESAYM/Time-Piece-1.3204.tar.gz',
|
||||||
|
+ 'DISTRIBUTION' => 'ESAYM/Time-Piece-1.33.tar.gz',
|
||||||
|
'FILES' => q[cpan/Time-Piece],
|
||||||
|
'EXCLUDED' => [ qw[reverse_deps.txt] ],
|
||||||
|
},
|
||||||
|
diff --git a/cpan/Time-Piece/Piece.pm b/cpan/Time-Piece/Piece.pm
|
||||||
|
index 8acba86e76..d5624636c6 100644
|
||||||
|
--- a/cpan/Time-Piece/Piece.pm
|
||||||
|
+++ b/cpan/Time-Piece/Piece.pm
|
||||||
|
@@ -6,6 +6,7 @@ use XSLoader ();
|
||||||
|
use Time::Seconds;
|
||||||
|
use Carp;
|
||||||
|
use Time::Local;
|
||||||
|
+use Scalar::Util qw/ blessed /;
|
||||||
|
|
||||||
|
use Exporter ();
|
||||||
|
|
||||||
|
@@ -18,7 +19,7 @@ our %EXPORT_TAGS = (
|
||||||
|
':override' => 'internal',
|
||||||
|
);
|
||||||
|
|
||||||
|
-our $VERSION = '1.3204';
|
||||||
|
+our $VERSION = '1.33';
|
||||||
|
|
||||||
|
XSLoader::load( 'Time::Piece', $VERSION );
|
||||||
|
|
||||||
|
@@ -63,13 +64,27 @@ sub gmtime {
|
||||||
|
$class->_mktime($time, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+# Check if the supplied param is either a normal array (as returned from
|
||||||
|
+# localtime in list context) or a Time::Piece-like wrapper around one.
|
||||||
|
+#
|
||||||
|
+# We need to differentiate between an array ref that we can interrogate and
|
||||||
|
+# other blessed objects (like overloaded values).
|
||||||
|
+sub _is_time_struct {
|
||||||
|
+ return 1 if ref($_[1]) eq 'ARRAY';
|
||||||
|
+ return 1 if blessed($_[1]) && $_[1]->isa('Time::Piece');
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
sub new {
|
||||||
|
my $class = shift;
|
||||||
|
my ($time) = @_;
|
||||||
|
|
||||||
|
my $self;
|
||||||
|
|
||||||
|
- if (ref($time)) {
|
||||||
|
+ if ($class->_is_time_struct($time)) {
|
||||||
|
$self = $time->[c_islocal] ? $class->localtime($time) : $class->gmtime($time);
|
||||||
|
}
|
||||||
|
elsif (defined($time)) {
|
||||||
|
@@ -106,10 +121,9 @@ sub parse {
|
||||||
|
sub _mktime {
|
||||||
|
my ($class, $time, $islocal) = @_;
|
||||||
|
|
||||||
|
- $class = eval { (ref $class) && (ref $class)->isa('Time::Piece') }
|
||||||
|
- ? ref $class
|
||||||
|
- : $class;
|
||||||
|
- if (ref($time)) {
|
||||||
|
+ $class = blessed($class) || $class;
|
||||||
|
+
|
||||||
|
+ if ($class->_is_time_struct($time)) {
|
||||||
|
my @new_time = @$time;
|
||||||
|
my @tm_parts = (@new_time[c_sec .. c_mon], $new_time[c_year]+1900);
|
||||||
|
$new_time[c_epoch] = $islocal ? timelocal(@tm_parts) : timegm(@tm_parts);
|
||||||
|
@@ -639,7 +653,8 @@ sub cdate {
|
||||||
|
|
||||||
|
sub str_compare {
|
||||||
|
my ($lhs, $rhs, $reverse) = @_;
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Piece')) {
|
||||||
|
+
|
||||||
|
+ if (blessed($rhs) && $rhs->isa('Time::Piece')) {
|
||||||
|
$rhs = "$rhs";
|
||||||
|
}
|
||||||
|
return $reverse ? $rhs cmp $lhs->cdate : $lhs->cdate cmp $rhs;
|
||||||
|
@@ -652,9 +667,6 @@ use overload
|
||||||
|
sub subtract {
|
||||||
|
my $time = shift;
|
||||||
|
my $rhs = shift;
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Seconds')) {
|
||||||
|
- $rhs = $rhs->seconds;
|
||||||
|
- }
|
||||||
|
|
||||||
|
if (shift)
|
||||||
|
{
|
||||||
|
@@ -667,7 +679,7 @@ sub subtract {
|
||||||
|
return $rhs - "$time";
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Piece')) {
|
||||||
|
+ if (blessed($rhs) && $rhs->isa('Time::Piece')) {
|
||||||
|
return Time::Seconds->new($time->epoch - $rhs->epoch);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
@@ -679,10 +691,6 @@ sub subtract {
|
||||||
|
sub add {
|
||||||
|
my $time = shift;
|
||||||
|
my $rhs = shift;
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Seconds')) {
|
||||||
|
- $rhs = $rhs->seconds;
|
||||||
|
- }
|
||||||
|
- croak "Invalid rhs of addition: $rhs" if ref($rhs);
|
||||||
|
|
||||||
|
return $time->_mktime(($time->epoch + $rhs), $time->[c_islocal]);
|
||||||
|
}
|
||||||
|
@@ -692,7 +700,7 @@ use overload
|
||||||
|
|
||||||
|
sub get_epochs {
|
||||||
|
my ($lhs, $rhs, $reverse) = @_;
|
||||||
|
- if (!UNIVERSAL::isa($rhs, 'Time::Piece')) {
|
||||||
|
+ unless (blessed($rhs) && $rhs->isa('Time::Piece')) {
|
||||||
|
$rhs = $lhs->new($rhs);
|
||||||
|
}
|
||||||
|
if ($reverse) {
|
||||||
|
diff --git a/cpan/Time-Piece/Seconds.pm b/cpan/Time-Piece/Seconds.pm
|
||||||
|
index 3a56b74485..71a4bd27f2 100644
|
||||||
|
--- a/cpan/Time-Piece/Seconds.pm
|
||||||
|
+++ b/cpan/Time-Piece/Seconds.pm
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
package Time::Seconds;
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
-our $VERSION = '1.3204';
|
||||||
|
+our $VERSION = '1.33';
|
||||||
|
|
||||||
|
use Exporter 5.57 'import';
|
||||||
|
|
||||||
|
diff --git a/cpan/Time-Piece/t/06subclass.t b/cpan/Time-Piece/t/06subclass.t
|
||||||
|
index d6e4315c8f..a72cfb89ac 100644
|
||||||
|
--- a/cpan/Time-Piece/t/06subclass.t
|
||||||
|
+++ b/cpan/Time-Piece/t/06subclass.t
|
||||||
|
@@ -35,6 +35,21 @@ for my $method (qw(new localtime gmtime)) {
|
||||||
|
isa_ok($diff, $class, "yesterday via subtraction operator");
|
||||||
|
}
|
||||||
|
|
||||||
|
+{
|
||||||
|
+ my $g = $class->gmtime;
|
||||||
|
+ my $l = $class->localtime;
|
||||||
|
+
|
||||||
|
+ #via clone
|
||||||
|
+ my $l_clone = $class->new($l);
|
||||||
|
+ isa_ok($l_clone, $class, 'custom localtime via clone');
|
||||||
|
+ cmp_ok("$l_clone", 'eq', "$l", 'Clones match');
|
||||||
|
+
|
||||||
|
+ #via clone with gmtime
|
||||||
|
+ my $g_clone = $class->new($g);
|
||||||
|
+ isa_ok($g_clone, $class, 'custom gmtime via clone');
|
||||||
|
+ cmp_ok("$g_clone", 'eq', "$g", 'Clones match');
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
{
|
||||||
|
# let's verify that we can use gmtime from T::P without the export magic
|
||||||
|
my $piece = Time::Piece::gmtime;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
@ -1,196 +0,0 @@
|
|||||||
From 906e92715f4ee68ea95086867f4f97b1f4f10ac3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tony Cook <tony@develop-help.com>
|
|
||||||
Date: Tue, 3 Oct 2023 09:40:07 +1100
|
|
||||||
Subject: [PATCH] win32: default the shell to cmd.exe in the Windows system
|
|
||||||
directory
|
|
||||||
|
|
||||||
This prevents picking up cmd.exe from the current directory, or
|
|
||||||
even from the PATH.
|
|
||||||
|
|
||||||
This protects against a privilege escalation attack where an attacker
|
|
||||||
in a separate session creates a cmd.exe in a directory where the
|
|
||||||
target account happens to have its current directory.
|
|
||||||
---
|
|
||||||
t/win32/system.t | 30 ++++++++++++--------
|
|
||||||
win32/win32.c | 71 +++++++++++++++++++++++++++++++++++++++++-------
|
|
||||||
2 files changed, 79 insertions(+), 22 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/t/win32/system.t b/t/win32/system.t
|
|
||||||
index 939a02db55..c885059012 100644
|
|
||||||
--- a/t/win32/system.t
|
|
||||||
+++ b/t/win32/system.t
|
|
||||||
@@ -82,6 +82,7 @@ close $F;
|
|
||||||
chdir($testdir);
|
|
||||||
END {
|
|
||||||
chdir($cwd) && rmtree("$cwd/$testdir") if -d "$cwd/$testdir";
|
|
||||||
+ unlink "cmd.exe";
|
|
||||||
}
|
|
||||||
if (open(my $EIN, "$cwd/win32/${exename}_exe.uu")) {
|
|
||||||
note "Unpacking $exename.exe";
|
|
||||||
@@ -104,21 +105,20 @@ else {
|
|
||||||
}
|
|
||||||
note "Compiling $exename.c";
|
|
||||||
note "$Config{cc} $Config{ccflags} $exename.c";
|
|
||||||
- if (system("$Config{cc} $Config{ccflags} $minus_o $exename.c >log 2>&1") != 0) {
|
|
||||||
+ if (system("$Config{cc} $Config{ccflags} $minus_o $exename.c >log 2>&1") != 0 ||
|
|
||||||
+ !-f "$exename.exe") {
|
|
||||||
note "Could not compile $exename.c, status $?";
|
|
||||||
- note "Where is your C compiler?";
|
|
||||||
- skip_all "can't build test executable";
|
|
||||||
- }
|
|
||||||
- unless (-f "$exename.exe") {
|
|
||||||
- if (open(LOG,'<log'))
|
|
||||||
- {
|
|
||||||
- while(<LOG>) {
|
|
||||||
- note $_;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ note "Where is your C compiler?";
|
|
||||||
+ if (open(LOG,'<log'))
|
|
||||||
+ {
|
|
||||||
+ while(<LOG>) {
|
|
||||||
+ note $_;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else {
|
|
||||||
- warn "Cannot open log (in $testdir):$!";
|
|
||||||
+ warn "Cannot open log (in $testdir):$!";
|
|
||||||
}
|
|
||||||
+ skip_all "can't build test executable";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
copy("$plxname.bat","$plxname.cmd");
|
|
||||||
@@ -128,6 +128,12 @@ unless (-x "$testdir/$exename.exe") {
|
|
||||||
skip_all "can't build test executable";
|
|
||||||
}
|
|
||||||
|
|
||||||
+# test we only look for cmd.exe in the standard place
|
|
||||||
+delete $ENV{PERLSHELL};
|
|
||||||
+copy("$testdir/$exename.exe", "$testdir/cmd.exe") or die $!;
|
|
||||||
+copy("$testdir/$exename.exe", "cmd.exe") or die $!;
|
|
||||||
+$ENV{PATH} = qq("$testdir";$ENV{PATH});
|
|
||||||
+
|
|
||||||
open my $T, "$^X -I../lib -w win32/system_tests |"
|
|
||||||
or die "Can't spawn win32/system_tests: $!";
|
|
||||||
my $expect;
|
|
||||||
diff --git a/win32/win32.c b/win32/win32.c
|
|
||||||
index 94248ca168..5d54cf8d4a 100644
|
|
||||||
--- a/win32/win32.c
|
|
||||||
+++ b/win32/win32.c
|
|
||||||
@@ -117,7 +117,7 @@ static char* win32_get_xlib(const char *pl,
|
|
||||||
|
|
||||||
static BOOL has_shell_metachars(const char *ptr);
|
|
||||||
static long tokenize(const char *str, char **dest, char ***destv);
|
|
||||||
-static void get_shell(void);
|
|
||||||
+static int get_shell(void);
|
|
||||||
static char* find_next_space(const char *s);
|
|
||||||
static int do_spawn2(pTHX_ const char *cmd, int exectype);
|
|
||||||
static int do_spawn2_handles(pTHX_ const char *cmd, int exectype,
|
|
||||||
@@ -600,7 +600,13 @@ tokenize(const char *str, char **dest, char ***destv)
|
|
||||||
return items;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void
|
|
||||||
+static const char
|
|
||||||
+cmd_opts[] = "/x/d/c";
|
|
||||||
+
|
|
||||||
+static const char
|
|
||||||
+shell_cmd[] = "cmd.exe";
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
get_shell(void)
|
|
||||||
{
|
|
||||||
dTHX;
|
|
||||||
@@ -612,12 +618,53 @@ get_shell(void)
|
|
||||||
* interactive use (which is what most programs look in COMSPEC
|
|
||||||
* for).
|
|
||||||
*/
|
|
||||||
- const char* defaultshell = "cmd.exe /x/d/c";
|
|
||||||
- const char *usershell = PerlEnv_getenv("PERL5SHELL");
|
|
||||||
- w32_perlshell_items = tokenize(usershell ? usershell : defaultshell,
|
|
||||||
- &w32_perlshell_tokens,
|
|
||||||
- &w32_perlshell_vec);
|
|
||||||
+ const char *shell = PerlEnv_getenv("PERL5SHELL");
|
|
||||||
+ if (shell) {
|
|
||||||
+ w32_perlshell_items = tokenize(shell,
|
|
||||||
+ &w32_perlshell_tokens,
|
|
||||||
+ &w32_perlshell_vec);
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ /* tokenize does some Unix-ish like things like
|
|
||||||
+ \\ escaping that don't work well here
|
|
||||||
+ */
|
|
||||||
+ char shellbuf[MAX_PATH];
|
|
||||||
+ UINT len = GetSystemDirectoryA(shellbuf, sizeof(shellbuf));
|
|
||||||
+ if (len == 0) {
|
|
||||||
+ translate_to_errno();
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ else if (len >= MAX_PATH) {
|
|
||||||
+ /* buffer too small */
|
|
||||||
+ errno = E2BIG;
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ if (shellbuf[len-1] != '\\') {
|
|
||||||
+ my_strlcat(shellbuf, "\\", sizeof(shellbuf));
|
|
||||||
+ ++len;
|
|
||||||
+ }
|
|
||||||
+ if (len + sizeof(shell_cmd) > sizeof(shellbuf)) {
|
|
||||||
+ errno = E2BIG;
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ my_strlcat(shellbuf, shell_cmd, sizeof(shellbuf));
|
|
||||||
+ len += sizeof(shell_cmd)-1;
|
|
||||||
+
|
|
||||||
+ Newx(w32_perlshell_vec, 3, char *);
|
|
||||||
+ Newx(w32_perlshell_tokens, len + 1 + sizeof(cmd_opts), char);
|
|
||||||
+
|
|
||||||
+ my_strlcpy(w32_perlshell_tokens, shellbuf, len+1);
|
|
||||||
+ my_strlcpy(w32_perlshell_tokens + len +1, cmd_opts,
|
|
||||||
+ sizeof(cmd_opts));
|
|
||||||
+
|
|
||||||
+ w32_perlshell_vec[0] = w32_perlshell_tokens;
|
|
||||||
+ w32_perlshell_vec[1] = w32_perlshell_tokens + len + 1;
|
|
||||||
+ w32_perlshell_vec[2] = NULL;
|
|
||||||
+
|
|
||||||
+ w32_perlshell_items = 2;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
@@ -635,7 +682,9 @@ Perl_do_aspawn(pTHX_ SV *really, SV **mark, SV **sp)
|
|
||||||
if (sp <= mark)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
- get_shell();
|
|
||||||
+ if (get_shell() < 0)
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
Newx(argv, (sp - mark) + w32_perlshell_items + 2, const char*);
|
|
||||||
|
|
||||||
if (SvNIOKp(*(mark+1)) && !SvPOKp(*(mark+1))) {
|
|
||||||
@@ -765,7 +814,8 @@ do_spawn2_handles(pTHX_ const char *cmd, int exectype, const int *handles)
|
|
||||||
if (needToTry) {
|
|
||||||
char **argv;
|
|
||||||
int i = -1;
|
|
||||||
- get_shell();
|
|
||||||
+ if (get_shell() < 0)
|
|
||||||
+ return -1;
|
|
||||||
Newx(argv, w32_perlshell_items + 2, char*);
|
|
||||||
while (++i < w32_perlshell_items)
|
|
||||||
argv[i] = w32_perlshell_vec[i];
|
|
||||||
@@ -3482,7 +3532,8 @@ win32_pipe(int *pfd, unsigned int size, int mode)
|
|
||||||
DllExport PerlIO*
|
|
||||||
win32_popenlist(const char *mode, IV narg, SV **args)
|
|
||||||
{
|
|
||||||
- get_shell();
|
|
||||||
+ if (get_shell() < 0)
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
return do_popen(mode, NULL, narg, args);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
From 92a9eb3d0d52ec7655c1beb29999a5a5219be664 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karl Williamson <khw@cpan.org>
|
|
||||||
Date: Sat, 9 Sep 2023 11:59:09 -0600
|
|
||||||
Subject: [PATCH] Fix read/write past buffer end: perl-security#140
|
|
||||||
|
|
||||||
A package name may be specified in a \p{...} regular expression
|
|
||||||
construct. If unspecified, "utf8::" is assumed, which is the package
|
|
||||||
all official Unicode properties are in. By specifying a different
|
|
||||||
package, one can create a user-defined property with the same
|
|
||||||
unqualified name as a Unicode one. Such a property is defined by a sub
|
|
||||||
whose name begins with "Is" or "In", and if the sub wishes to refer to
|
|
||||||
an official Unicode property, it must explicitly specify the "utf8::".
|
|
||||||
S_parse_uniprop_string() is used to parse the interior of both \p{} and
|
|
||||||
the user-defined sub lines.
|
|
||||||
|
|
||||||
In S_parse_uniprop_string(), it parses the input "name" parameter,
|
|
||||||
creating a modified copy, "lookup_name", malloc'ed with the same size as
|
|
||||||
"name". The modifications are essentially to create a canonicalized
|
|
||||||
version of the input, with such things as extraneous white-space
|
|
||||||
stripped off. I found it convenient to strip off the package specifier
|
|
||||||
"utf8::". To to so, the code simply pretends "lookup_name" begins just
|
|
||||||
after the "utf8::", and adjusts various other values to compensate.
|
|
||||||
However, it missed the adjustment of one required one.
|
|
||||||
|
|
||||||
This is only a problem when the property name begins with "perl" and
|
|
||||||
isn't "perlspace" nor "perlword". All such ones are undocumented
|
|
||||||
internal properties.
|
|
||||||
|
|
||||||
What happens in this case is that the input is reparsed with slightly
|
|
||||||
different rules in effect as to what is legal versus illegal. The
|
|
||||||
problem is that "lookup_name" no longer is pointing to its initial
|
|
||||||
value, but "name" is. Thus the space allocated for filling "lookup_name"
|
|
||||||
is now shorter than "name", and as this shortened "lookup_name" is
|
|
||||||
filled by copying suitable portions of "name", the write can be to
|
|
||||||
unallocated space.
|
|
||||||
|
|
||||||
The solution is to skip the "utf8::" when reparsing "name". Then both
|
|
||||||
"lookup_name" and "name" are effectively shortened by the same amount,
|
|
||||||
and there is no going off the end.
|
|
||||||
|
|
||||||
This commit also does white-space adjustment so that things align
|
|
||||||
vertically for readability.
|
|
||||||
|
|
||||||
This can be easily backported to earlier Perl releases.
|
|
||||||
|
|
||||||
Reference:https://github.com/Perl/perl5/commit/92a9eb3d0d52ec7655c1beb29999a5a5219be664
|
|
||||||
Conflict:NA
|
|
||||||
|
|
||||||
---
|
|
||||||
regcomp.c | 17 +++++++++++------
|
|
||||||
t/re/pat_advanced.t | 8 ++++++++
|
|
||||||
2 files changed, 19 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/regcomp.c b/regcomp.c
|
|
||||||
index d3c135f..67aa03e 100644
|
|
||||||
--- a/regcomp.c
|
|
||||||
+++ b/regcomp.c
|
|
||||||
@@ -14450,7 +14450,7 @@ S_parse_uniprop_string(pTHX_
|
|
||||||
* compile perl to know about them) */
|
|
||||||
bool is_nv_type = FALSE;
|
|
||||||
|
|
||||||
- unsigned int i, j = 0;
|
|
||||||
+ unsigned int i = 0, i_zero = 0, j = 0;
|
|
||||||
int equals_pos = -1; /* Where the '=' is found, or negative if none */
|
|
||||||
int slash_pos = -1; /* Where the '/' is found, or negative if none */
|
|
||||||
int table_index = 0; /* The entry number for this property in the table
|
|
||||||
@@ -14582,9 +14582,13 @@ S_parse_uniprop_string(pTHX_
|
|
||||||
* all of them are considered to be for that package. For the purposes of
|
|
||||||
* parsing the rest of the property, strip it off */
|
|
||||||
if (non_pkg_begin == STRLENs("utf8::") && memBEGINPs(name, name_len, "utf8::")) {
|
|
||||||
- lookup_name += STRLENs("utf8::");
|
|
||||||
- j -= STRLENs("utf8::");
|
|
||||||
- equals_pos -= STRLENs("utf8::");
|
|
||||||
+ lookup_name += STRLENs("utf8::");
|
|
||||||
+ j -= STRLENs("utf8::");
|
|
||||||
+ equals_pos -= STRLENs("utf8::");
|
|
||||||
+ i_zero = STRLENs("utf8::"); /* When resetting 'i' to reparse
|
|
||||||
+ from the beginning, it has to be
|
|
||||||
+ set past what we're stripping
|
|
||||||
+ off */
|
|
||||||
stripped_utf8_pkg = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -14998,7 +15002,8 @@ S_parse_uniprop_string(pTHX_
|
|
||||||
|
|
||||||
/* We set the inputs back to 0 and the code below will reparse,
|
|
||||||
* using strict */
|
|
||||||
- i = j = 0;
|
|
||||||
+ i = i_zero;
|
|
||||||
+ j = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -15019,7 +15024,7 @@ S_parse_uniprop_string(pTHX_
|
|
||||||
* separates two digits */
|
|
||||||
if (cur == '_') {
|
|
||||||
if ( stricter
|
|
||||||
- && ( i == 0 || (int) i == equals_pos || i == name_len- 1
|
|
||||||
+ && ( i == i_zero || (int) i == equals_pos || i == name_len- 1
|
|
||||||
|| ! isDIGIT_A(name[i-1]) || ! isDIGIT_A(name[i+1])))
|
|
||||||
{
|
|
||||||
lookup_name[j++] = '_';
|
|
||||||
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
|
|
||||||
index d64bd1b..e0266c0 100644
|
|
||||||
--- a/t/re/pat_advanced.t
|
|
||||||
+++ b/t/re/pat_advanced.t
|
|
||||||
@@ -2695,6 +2695,14 @@ EOF_DEBUG_OUT
|
|
||||||
"Related to Github Issue #19350, forward \\g{x} pattern segv under use re Debug => 'PARSE'");
|
|
||||||
}
|
|
||||||
|
|
||||||
+ { # perl-security#140, read/write past buffer end
|
|
||||||
+ fresh_perl_like('qr/\p{utf8::perl x}/',
|
|
||||||
+ qr/Illegal user-defined property name "utf8::perl x" in regex/,
|
|
||||||
+ {}, "perl-security#140");
|
|
||||||
+ fresh_perl_is('qr/\p{utf8::_perl_surrogate}/', "",
|
|
||||||
+ {}, "perl-security#140");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
{ # GH 20009
|
|
||||||
my $x = "awesome quotes";
|
|
||||||
utf8::upgrade($x);
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
From 55a0aab68d5ce90ce8bb7442ba61639c49e50c1d Mon Sep 17 00:00:00 2001
|
|
||||||
From: root <root@localhost.localdomain>
|
|
||||||
Date: Mon, 21 Sep 2020 09:45:33 +0800
|
|
||||||
Subject: [PATCH] aarch64 ilp32 support
|
|
||||||
|
|
||||||
Conflict:NA
|
|
||||||
Reference:https://build.opensuse.org/package/view_file/devel:ARM:Factory:Contrib:ILP32/perl/aarch64-ilp32.patch?expand=1
|
|
||||||
|
|
||||||
---
|
|
||||||
hints/linux.sh | 19 +++++++++++++++++++
|
|
||||||
1 file changed, 19 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/hints/linux.sh b/hints/linux.sh
|
|
||||||
index c749f0f..27322dc 100644
|
|
||||||
--- a/hints/linux.sh
|
|
||||||
+++ b/hints/linux.sh
|
|
||||||
@@ -311,6 +311,25 @@ sparc*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
+case $archname in
|
|
||||||
+aarch64-linux)
|
|
||||||
+ cat >try.c <<'EOM'
|
|
||||||
+/* Test for ILP32 */
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+main() {
|
|
||||||
+ int ilp32 = 0;
|
|
||||||
+ #ifdef __ILP32__
|
|
||||||
+ ilp32 = 1;
|
|
||||||
+ #endif
|
|
||||||
+ exit(!ilp32);
|
|
||||||
+}
|
|
||||||
+EOM
|
|
||||||
+ if ${cc:-gcc} $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
|
|
||||||
+ archname=aarch64-ilp32-linux
|
|
||||||
+ fi
|
|
||||||
+ ;;
|
|
||||||
+esac
|
|
||||||
+
|
|
||||||
# SuSE8.2 has /usr/lib/libndbm* which are ld scripts rather than
|
|
||||||
# true libraries. The scripts cause binding against static
|
|
||||||
# version of -lgdbm which is a bad idea. So if we have 'nm'
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
@ -8,10 +8,10 @@ Subject: [PATCH] change lib to lib64
|
|||||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/Configure b/Configure
|
diff --git a/Configure b/Configure
|
||||||
index cc74bdc..0e7441d 100755
|
index 3be9f05..1c53af7 100755
|
||||||
--- a/Configure
|
--- a/Configure
|
||||||
+++ b/Configure
|
+++ b/Configure
|
||||||
@@ -7229,8 +7229,8 @@ esac'
|
@@ -7269,8 +7269,8 @@ esac'
|
||||||
: Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
|
: Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
|
||||||
case "$installstyle" in
|
case "$installstyle" in
|
||||||
'') case "$prefix" in
|
'') case "$prefix" in
|
||||||
@ -22,7 +22,7 @@ index cc74bdc..0e7441d 100755
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*) dflt="$installstyle" ;;
|
*) dflt="$installstyle" ;;
|
||||||
@@ -7296,8 +7296,8 @@ esac
|
@@ -7336,8 +7336,8 @@ esac
|
||||||
: /opt/perl/lib/perl5... would be redundant.
|
: /opt/perl/lib/perl5... would be redundant.
|
||||||
: The default "style" setting is made in installstyle.U
|
: The default "style" setting is made in installstyle.U
|
||||||
case "$installstyle" in
|
case "$installstyle" in
|
||||||
@ -33,7 +33,7 @@ index cc74bdc..0e7441d 100755
|
|||||||
esac
|
esac
|
||||||
eval $prefixit
|
eval $prefixit
|
||||||
$cat <<EOM
|
$cat <<EOM
|
||||||
@@ -7544,8 +7544,8 @@ siteprefixexp="$ansexp"
|
@@ -7584,8 +7584,8 @@ siteprefixexp="$ansexp"
|
||||||
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
|
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
|
||||||
case "$sitelib" in
|
case "$sitelib" in
|
||||||
'') case "$installstyle" in
|
'') case "$installstyle" in
|
||||||
@ -44,7 +44,7 @@ index cc74bdc..0e7441d 100755
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*) dflt="$sitelib"
|
*) dflt="$sitelib"
|
||||||
@@ -7963,8 +7963,8 @@ case "$vendorprefix" in
|
@@ -8001,8 +8001,8 @@ case "$vendorprefix" in
|
||||||
'')
|
'')
|
||||||
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
|
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
|
||||||
case "$installstyle" in
|
case "$installstyle" in
|
||||||
@ -56,5 +56,5 @@ index cc74bdc..0e7441d 100755
|
|||||||
;;
|
;;
|
||||||
*) dflt="$vendorlib"
|
*) dflt="$vendorlib"
|
||||||
--
|
--
|
||||||
2.27.0
|
1.8.3.1
|
||||||
|
|
||||||
|
|||||||
54
create-libperl-soname.patch
Normal file
54
create-libperl-soname.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From fe7ae3db489775f409b9284c5e81ce91ab8578da Mon Sep 17 00:00:00 2001
|
||||||
|
From: Torsten Veller <tove@gentoo.org>
|
||||||
|
Date: Mon, 30 Dec 2019 15:10:30 +0800
|
||||||
|
Subject: [PATCH] create libperl soname
|
||||||
|
|
||||||
|
See details: https://bugs.gentoo.org/286840
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile.SH | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.SH b/Makefile.SH
|
||||||
|
index 123903d..e73f0ec 100755
|
||||||
|
--- a/Makefile.SH
|
||||||
|
+++ b/Makefile.SH
|
||||||
|
@@ -68,7 +68,7 @@ true)
|
||||||
|
${api_revision}.${api_version}.${api_subversion} \
|
||||||
|
-current_version \
|
||||||
|
${revision}.${patchlevel}.${subversion} \
|
||||||
|
- -install_name \$(shrpdir)/\$@"
|
||||||
|
+ -install_name \$(shrpdir)/libperl.${revision}.${patchlevel}.dylib"
|
||||||
|
;;
|
||||||
|
cygwin*)
|
||||||
|
shrpldflags="$shrpldflags -Wl,--out-implib=libperl.dll.a -Wl,--image-base,0x52000000"
|
||||||
|
@@ -76,13 +76,16 @@ true)
|
||||||
|
;;
|
||||||
|
sunos*)
|
||||||
|
linklibperl="-lperl"
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
;;
|
||||||
|
netbsd*|freebsd[234]*|openbsd*|dragonfly*|bitrig*)
|
||||||
|
linklibperl="-L. -lperl"
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
;;
|
||||||
|
interix*)
|
||||||
|
linklibperl="-L. -lperl"
|
||||||
|
shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,--image-base,0x57000000 -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
;;
|
||||||
|
aix*)
|
||||||
|
case "$cc" in
|
||||||
|
@@ -120,6 +123,9 @@ true)
|
||||||
|
linklibperl='libperl.x'
|
||||||
|
DPERL_EXTERNAL_GLOB=''
|
||||||
|
;;
|
||||||
|
+ linux*)
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
case "$ldlibpthname" in
|
||||||
|
'') ;;
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
81
delete-ext-GDBM_File-t-fatal.t.patch
Normal file
81
delete-ext-GDBM_File-t-fatal.t.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
From 4f712a7338a4aa692c118460f734a2c4a6710550 Mon Sep 17 00:00:00 2001
|
||||||
|
From: openEuler Buildteam <buildteam@openeuler.org>
|
||||||
|
Date: Mon, 30 Dec 2019 15:20:40 +0800
|
||||||
|
Subject: [PATCH] delete ext GDBM_File t fatal.t
|
||||||
|
|
||||||
|
---
|
||||||
|
MANIFEST | 1 -
|
||||||
|
ext/GDBM_File/t/fatal.t | 49 -------------------------------------------------
|
||||||
|
2 files changed, 50 deletions(-)
|
||||||
|
delete mode 100644 ext/GDBM_File/t/fatal.t
|
||||||
|
|
||||||
|
diff --git a/MANIFEST b/MANIFEST
|
||||||
|
index 2005f54..f778051 100644
|
||||||
|
--- a/MANIFEST
|
||||||
|
+++ b/MANIFEST
|
||||||
|
@@ -4089,7 +4089,6 @@ ext/GDBM_File/GDBM_File.pm GDBM extension Perl module
|
||||||
|
ext/GDBM_File/GDBM_File.xs GDBM extension external subroutines
|
||||||
|
ext/GDBM_File/hints/sco.pl Hint for GDBM_File for named architecture
|
||||||
|
ext/GDBM_File/Makefile.PL GDBM extension makefile writer
|
||||||
|
-ext/GDBM_File/t/fatal.t Test the fatal_func argument to gdbm_open
|
||||||
|
ext/GDBM_File/t/gdbm.t See if GDBM_File works
|
||||||
|
ext/GDBM_File/typemap GDBM extension interface types
|
||||||
|
ext/Hash-Util/Changes Change history of Hash::Util
|
||||||
|
diff --git a/ext/GDBM_File/t/fatal.t b/ext/GDBM_File/t/fatal.t
|
||||||
|
deleted file mode 100644
|
||||||
|
index 0e426d4..0000000
|
||||||
|
--- a/ext/GDBM_File/t/fatal.t
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,49 +0,0 @@
|
||||||
|
-#!./perl -w
|
||||||
|
-use strict;
|
||||||
|
-
|
||||||
|
-use Test::More;
|
||||||
|
-use Config;
|
||||||
|
-
|
||||||
|
-BEGIN {
|
||||||
|
- plan(skip_all => "GDBM_File was not built")
|
||||||
|
- unless $Config{extensions} =~ /\bGDBM_File\b/;
|
||||||
|
-
|
||||||
|
- # https://rt.perl.org/Public/Bug/Display.html?id=117967
|
||||||
|
- plan(skip_all => "GDBM_File is flaky in $^O")
|
||||||
|
- if $^O =~ /darwin/;
|
||||||
|
-
|
||||||
|
- plan(tests => 8);
|
||||||
|
- use_ok('GDBM_File');
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-unlink <Op_dbmx*>;
|
||||||
|
-
|
||||||
|
-open my $fh, '<', $^X or die "Can't open $^X: $!";
|
||||||
|
-my $fileno = fileno $fh;
|
||||||
|
-isnt($fileno, undef, "Can find next available file descriptor");
|
||||||
|
-close $fh or die $!;
|
||||||
|
-
|
||||||
|
-is((open $fh, "<&=$fileno"), undef,
|
||||||
|
- "Check that we cannot open fileno $fileno. \$! is $!");
|
||||||
|
-
|
||||||
|
-umask(0);
|
||||||
|
-my %h;
|
||||||
|
-isa_ok(tie(%h, 'GDBM_File', 'Op_dbmx', GDBM_WRCREAT, 0640), 'GDBM_File');
|
||||||
|
-
|
||||||
|
-isnt((open $fh, "<&=$fileno"), undef, "dup fileno $fileno")
|
||||||
|
- or diag("\$! = $!");
|
||||||
|
-isnt(close $fh, undef,
|
||||||
|
- "close fileno $fileno, out from underneath the GDBM_File");
|
||||||
|
-is(eval {
|
||||||
|
- $h{Perl} = 'Rules';
|
||||||
|
- untie %h;
|
||||||
|
- 1;
|
||||||
|
-}, undef, 'Trapped error when attempting to write to knobbled GDBM_File');
|
||||||
|
-
|
||||||
|
-# Observed "File write error" and "lseek error" from two different systems.
|
||||||
|
-# So there might be more variants. Important part was that we trapped the error
|
||||||
|
-# via croak.
|
||||||
|
-like($@, qr/ at .*\bfatal\.t line \d+\.\n\z/,
|
||||||
|
- 'expected error message from GDBM_File');
|
||||||
|
-
|
||||||
|
-unlink <Op_dbmx*>;
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -8,10 +8,10 @@ Subject: [PATCH] disable rpath by default
|
|||||||
1 file changed, 3 deletions(-)
|
1 file changed, 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
index 977b50e..ac5cdb5 100644
|
index fe53be1..fd0f5b5 100644
|
||||||
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
@@ -1077,9 +1077,6 @@ sub xs_make_dynamic_lib {
|
@@ -1045,9 +1045,6 @@ sub xs_make_dynamic_lib {
|
||||||
}
|
}
|
||||||
|
|
||||||
my $ld_run_path_shell = "";
|
my $ld_run_path_shell = "";
|
||||||
@ -22,5 +22,5 @@ index 977b50e..ac5cdb5 100644
|
|||||||
push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $dlsyms_arg, $ldfrom, $self->xs_obj_opt('$@'), $libs, $exportlist;
|
push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $dlsyms_arg, $ldfrom, $self->xs_obj_opt('$@'), $libs, $exportlist;
|
||||||
%s$(LD) %s $(LDDLFLAGS) %s %s $(OTHERLDFLAGS) %s $(MYEXTLIB) \
|
%s$(LD) %s $(LDDLFLAGS) %s %s $(OTHERLDFLAGS) %s $(MYEXTLIB) \
|
||||||
--
|
--
|
||||||
2.27.0
|
1.8.3.1
|
||||||
|
|
||||||
|
|||||||
52
locale.c-Fix-conditional-compilation.patch
Normal file
52
locale.c-Fix-conditional-compilation.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From 17dd77cd74f0a69332c091f816162e34abff30c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Francois Perrad <francois.perrad@gadz.org>
|
||||||
|
Date: Mon, 2 Jul 2018 00:17:44 +0200
|
||||||
|
Subject: [PATCH] locale.c: Fix conditional compilation
|
||||||
|
|
||||||
|
With Perl 5.28.0, there are some mismatches between blocks
|
||||||
|
and conditional compilation in the Perl__is_cur_LC_category_utf8() function.
|
||||||
|
The compilation of miniperl could fails like this:
|
||||||
|
```
|
||||||
|
locale.c: In function `Perl__is_cur_LC_category_utf8`:
|
||||||
|
locale.c:5481:1: error: expected declaration or statement at end of input
|
||||||
|
}
|
||||||
|
^
|
||||||
|
```
|
||||||
|
|
||||||
|
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
||||||
|
---
|
||||||
|
locale.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/locale.c b/locale.c
|
||||||
|
index f8f77fb3d0..f2731846ad 100644
|
||||||
|
--- a/locale.c
|
||||||
|
+++ b/locale.c
|
||||||
|
@@ -4649,11 +4649,12 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
|
||||||
|
&& wc == (wchar_t) UNICODE_REPLACEMENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
+# endif
|
||||||
|
+
|
||||||
|
restore_switched_locale(LC_CTYPE, original_ctype_locale);
|
||||||
|
goto finish_and_return;
|
||||||
|
}
|
||||||
|
|
||||||
|
-# endif
|
||||||
|
# else
|
||||||
|
|
||||||
|
/* Here, we must have a C89 compiler that doesn't have mbtowc(). Next
|
||||||
|
@@ -4885,9 +4886,9 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
|
||||||
|
is_utf8 = TRUE;
|
||||||
|
goto finish_and_return;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
# endif
|
||||||
|
+ }
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Other common encodings are the ISO 8859 series, which aren't UTF-8. But
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
136
macros.perl
136
macros.perl
@ -1,136 +0,0 @@
|
|||||||
# macros.perl file
|
|
||||||
# macros for perl module building. handle with care.
|
|
||||||
|
|
||||||
# Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
|
|
||||||
#
|
|
||||||
%perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
|
|
||||||
%perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
|
|
||||||
%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
|
|
||||||
%perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
|
|
||||||
%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
|
|
||||||
%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
|
|
||||||
|
|
||||||
# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
|
|
||||||
#
|
|
||||||
%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")
|
|
||||||
%perl_prefix %{buildroot}
|
|
||||||
|
|
||||||
# Macro to encapsulate perl requires (empty for fedora)
|
|
||||||
# we keep the complicated form even here to easy sync the other macros with
|
|
||||||
# perl-macros package
|
|
||||||
#
|
|
||||||
%perl_requires() \
|
|
||||||
%if 0%{?suse_version} > 0 \
|
|
||||||
Requires: perl(:MODULE_COMPAT_%{perl_version}) \
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%libperl_requires() \
|
|
||||||
%if 0%{?suse_version} > 0 \
|
|
||||||
Requires: perl = %{perl_version} \
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# suse specific macros
|
|
||||||
#
|
|
||||||
%perl_make_install make DESTDIR=$RPM_BUILD_ROOT install_vendor
|
|
||||||
%perl_process_packlist(n:) \
|
|
||||||
if test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT%perl_vendorarch/auto; then \
|
|
||||||
find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm \
|
|
||||||
if [ %{_target_cpu} == noarch ]; then \
|
|
||||||
find $RPM_BUILD_ROOT%perl_vendorarch/auto -depth -type d -print0 | xargs -0 -r rmdir \
|
|
||||||
fi \
|
|
||||||
fi \
|
|
||||||
rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \
|
|
||||||
%nil
|
|
||||||
|
|
||||||
# macro: perl_gen_filelist (from Christian <chris@computersalat.de>)
|
|
||||||
# do the rpmlint happy filelist generation
|
|
||||||
# with %dir in front of directories
|
|
||||||
#
|
|
||||||
%perl_gen_filelist(n)\
|
|
||||||
FILES=%{name}.files\
|
|
||||||
# fgen_dir func\
|
|
||||||
# IN: dir\
|
|
||||||
fgen_dir(){\
|
|
||||||
%{__cat} >> $FILES << EOF\
|
|
||||||
%dir ${1}\
|
|
||||||
EOF\
|
|
||||||
}\
|
|
||||||
# fgen_file func\
|
|
||||||
# IN: file\
|
|
||||||
fgen_file(){\
|
|
||||||
%{__cat} >> $FILES << EOF\
|
|
||||||
${1}\
|
|
||||||
EOF\
|
|
||||||
}\
|
|
||||||
# check for files in %{perl_vendorlib}\
|
|
||||||
RES=`find ${RPM_BUILD_ROOT}%{perl_vendorlib} -maxdepth 1 -type f`\
|
|
||||||
if [ -n "$RES" ]; then\
|
|
||||||
for file in $RES; do\
|
|
||||||
fgen_file "%{perl_vendorlib}/$(basename ${file})"\
|
|
||||||
done\
|
|
||||||
fi\
|
|
||||||
\
|
|
||||||
# get all dirs into array\
|
|
||||||
base_dir="${RPM_BUILD_ROOT}%{perl_vendorlib}/"\
|
|
||||||
for dir in `find ${base_dir} -type d | sort`; do\
|
|
||||||
if [ "$dir" = "${base_dir}" ]; then\
|
|
||||||
continue\
|
|
||||||
else\
|
|
||||||
el=${dir#$base_dir}\
|
|
||||||
all_dir=(${all_dir[@]} $el)\
|
|
||||||
fi\
|
|
||||||
done\
|
|
||||||
\
|
|
||||||
# build filelist\
|
|
||||||
for i in ${all_dir[@]}; do\
|
|
||||||
# do not add "dir {perl_vendorlib/arch}/auto", included in perl package\
|
|
||||||
if [ "${i}" = "auto" ]; then\
|
|
||||||
continue\
|
|
||||||
fi\
|
|
||||||
if [ "%{perl_vendorlib}/${i}" = "%{perl_vendorarch}/auto" ]; then\
|
|
||||||
continue\
|
|
||||||
else\
|
|
||||||
if [ -d ${base_dir}/${i} ]; then\
|
|
||||||
if [ "%{perl_vendorlib}/${i}" != "%{perl_vendorarch}" ]; then\
|
|
||||||
fgen_dir "%{perl_vendorlib}/${i}"\
|
|
||||||
fi\
|
|
||||||
RES=`find "${base_dir}/${i}" -maxdepth 1 -type f`\
|
|
||||||
for file in $RES; do\
|
|
||||||
fgen_file "%{perl_vendorlib}/${i}/$(basename ${file})"\
|
|
||||||
done\
|
|
||||||
fi\
|
|
||||||
fi\
|
|
||||||
done\
|
|
||||||
# add man pages\
|
|
||||||
# if exist :)\
|
|
||||||
if [ -d "${RPM_BUILD_ROOT}%{_mandir}" ]; then\
|
|
||||||
for file in `cd "${RPM_BUILD_ROOT}%{_mandir}" && find . -type f -name "*3pm*"`; do \
|
|
||||||
if test -e "%{_mandir}/$file" -o -e "%{_mandir}/$file.gz"; then \
|
|
||||||
mv ${RPM_BUILD_ROOT}%{_mandir}/$file ${RPM_BUILD_ROOT}%{_mandir}/${file/3pm/3pmc} \
|
|
||||||
fi \
|
|
||||||
done \
|
|
||||||
fgen_file "%{_mandir}/man?/*"\
|
|
||||||
fi\
|
|
||||||
\
|
|
||||||
# add packlist file\
|
|
||||||
# generated fom perllocal.pod\
|
|
||||||
if [ -f "${RPM_BUILD_ROOT}/var/adm/perl-modules/%{name}" ]; then\
|
|
||||||
fgen_file "/var/adm/perl-modules/%{name}"\
|
|
||||||
fi\
|
|
||||||
\
|
|
||||||
# check for files in %{_bindir}\
|
|
||||||
if [ -d ${RPM_BUILD_ROOT}%{_bindir} ]; then\
|
|
||||||
RES=`find "${RPM_BUILD_ROOT}%{_bindir}" -maxdepth 1 -type f`\
|
|
||||||
if [ -n "$RES" ]; then\
|
|
||||||
for file in $RES; do\
|
|
||||||
fgen_file "%{_bindir}/$(basename ${file})"\
|
|
||||||
done\
|
|
||||||
fi\
|
|
||||||
fi
|
|
||||||
106
multiconcat-mutator-not-seen-in-lex.patch
Normal file
106
multiconcat-mutator-not-seen-in-lex.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
From 0fe04e1dc741a43190e79a985fb0cec0493ebfe9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Wed, 29 Aug 2018 14:32:24 +0100
|
||||||
|
Subject: [PATCH] multiconcat: mutator not seen in (lex = ...) .= ...
|
||||||
|
|
||||||
|
RT #133441
|
||||||
|
|
||||||
|
TL;DR:
|
||||||
|
(($lex = expr1.expr2) .= expr3) was being misinterpreted as
|
||||||
|
(expr1 . expr2 . expr3) when the ($lex = expr1) subtree had had the
|
||||||
|
assign op optimised away by the OPpTARGET_MY optimisation.
|
||||||
|
|
||||||
|
Full details.
|
||||||
|
|
||||||
|
S_maybe_multiconcat() looks for suitable chains of OP_CONCAT to convert
|
||||||
|
into a single OP_MULTICONCAT.
|
||||||
|
|
||||||
|
Part of the code needs to distinguish between (expr . expr) and
|
||||||
|
(expr .= expr). This didn't used to be easy, as both are just OP_CONCAT
|
||||||
|
ops, but with the OPf_STACKED set on the second one. But...
|
||||||
|
|
||||||
|
perl also used to optimise ($a . $b . $c) into ($a . $b) .= $c, to
|
||||||
|
reuse the padtmp returned by the $a.$b concat. This meant that an
|
||||||
|
OP_CONCAT could have the OPf_STACKED flag on even when it was a '.'
|
||||||
|
rather than a '.='.
|
||||||
|
|
||||||
|
I disambiguated these cases by seeing whether the top op in the LHS
|
||||||
|
expression had the OPf_MOD flag set too - if so, it implies '.='.
|
||||||
|
|
||||||
|
This fails in the specific case where the LHS expression is a
|
||||||
|
sub-expression which is assigned to a lexical variable, e.g.
|
||||||
|
|
||||||
|
($lex = $a+$b) .= $c.
|
||||||
|
|
||||||
|
Initially the top node in the LHS expression above is OP_SASSIGN, with
|
||||||
|
OPf_MOD set due to the enclosing '.='. Then the OPpTARGET_MY
|
||||||
|
optimisation kicks in, and the ($lex = $a + $b) part of the optree is
|
||||||
|
converted from
|
||||||
|
|
||||||
|
sassign sKPRMS
|
||||||
|
add[t4] sK
|
||||||
|
padsv[a$] s
|
||||||
|
padsv[$b] s
|
||||||
|
padsv[$lex] s
|
||||||
|
|
||||||
|
to
|
||||||
|
add[$lex] sK/TARGMY
|
||||||
|
padsv[a$] s
|
||||||
|
padsv[$b] s
|
||||||
|
|
||||||
|
which is all fine and dandy, except that the top node of that optree no
|
||||||
|
longer has the OPf_MOD flag set, which trips up S_maybe_multiconcat into
|
||||||
|
no longer spotting that the outer concat is a '.=' rather than a '.'.
|
||||||
|
|
||||||
|
Whether the OPpTARGET_MY optimising code should copy the OPf_MOD from
|
||||||
|
the being-removed sassign op to its successor is an issue I won't
|
||||||
|
address here. But in the meantime, the good news is that for 5.28.0
|
||||||
|
I added the OPpCONCAT_NESTED private flag, which is set whenever
|
||||||
|
($a . $b . $c) is optimised into ($a . $b) .= $c. This means that it's
|
||||||
|
no longer necessary to inspect the OPf_MOD flag of the first child to
|
||||||
|
disambiguate the two cases. So the fix is trivial.
|
||||||
|
---
|
||||||
|
op.c | 1 -
|
||||||
|
t/opbasic/concat.t | 10 +++++++++-
|
||||||
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/op.c b/op.c
|
||||||
|
index ddeb484b64..d0dcffbecb 100644
|
||||||
|
--- a/op.c
|
||||||
|
+++ b/op.c
|
||||||
|
@@ -2722,7 +2722,6 @@ S_maybe_multiconcat(pTHX_ OP *o)
|
||||||
|
}
|
||||||
|
else if ( topop->op_type == OP_CONCAT
|
||||||
|
&& (topop->op_flags & OPf_STACKED)
|
||||||
|
- && (cUNOPo->op_first->op_flags & OPf_MOD)
|
||||||
|
&& (!(topop->op_private & OPpCONCAT_NESTED))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
diff --git a/t/opbasic/concat.t b/t/opbasic/concat.t
|
||||||
|
index 9ce9722f5c..4b73b22c1c 100644
|
||||||
|
--- a/t/opbasic/concat.t
|
||||||
|
+++ b/t/opbasic/concat.t
|
||||||
|
@@ -39,7 +39,7 @@ sub is {
|
||||||
|
return $ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
-print "1..253\n";
|
||||||
|
+print "1..254\n";
|
||||||
|
|
||||||
|
($a, $b, $c) = qw(foo bar);
|
||||||
|
|
||||||
|
@@ -853,3 +853,11 @@ package RT132595 {
|
||||||
|
my $res = $a.$t.$a.$t;
|
||||||
|
::is($res, "b1c1b1c2", "RT #132595");
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+# RT #133441
|
||||||
|
+# multiconcat wasn't seeing a mutator as a mutator
|
||||||
|
+{
|
||||||
|
+ my ($a, $b) = qw(a b);
|
||||||
|
+ ($a = 'A'.$b) .= 'c';
|
||||||
|
+ is($a, "Abc", "RT #133441");
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
56
perl-132655-nul-terminate-result-of-unpack-u-of-inva.patch
Normal file
56
perl-132655-nul-terminate-result-of-unpack-u-of-inva.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From 12cad9bd99725bba72029e2651b2b7f0cab2e0b0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Mon, 20 Aug 2018 16:31:45 +1000
|
||||||
|
Subject: [PATCH] (perl #132655) nul terminate result of unpack "u" of invalid
|
||||||
|
data
|
||||||
|
|
||||||
|
In the given test case, Perl_atof2() would run off the end of the PV,
|
||||||
|
producing an error from ASAN.
|
||||||
|
---
|
||||||
|
pp_pack.c | 5 ++++-
|
||||||
|
t/op/pack.t | 9 ++++++++-
|
||||||
|
2 files changed, 12 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pp_pack.c b/pp_pack.c
|
||||||
|
index 5e9cc64301..f8be9d48ae 100644
|
||||||
|
--- a/pp_pack.c
|
||||||
|
+++ b/pp_pack.c
|
||||||
|
@@ -1727,7 +1727,10 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
|
||||||
|
if (!checksum) {
|
||||||
|
const STRLEN l = (STRLEN) (strend - s) * 3 / 4;
|
||||||
|
sv = sv_2mortal(newSV(l));
|
||||||
|
- if (l) SvPOK_on(sv);
|
||||||
|
+ if (l) {
|
||||||
|
+ SvPOK_on(sv);
|
||||||
|
+ *SvEND(sv) = '\0';
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Note that all legal uuencoded strings are ASCII printables, so
|
||||||
|
diff --git a/t/op/pack.t b/t/op/pack.t
|
||||||
|
index cf0e286509..bb9f865091 100644
|
||||||
|
--- a/t/op/pack.t
|
||||||
|
+++ b/t/op/pack.t
|
||||||
|
@@ -12,7 +12,7 @@ my $no_endianness = $] > 5.009 ? '' :
|
||||||
|
my $no_signedness = $] > 5.009 ? '' :
|
||||||
|
"Signed/unsigned pack modifiers not available on this perl";
|
||||||
|
|
||||||
|
-plan tests => 14717;
|
||||||
|
+plan tests => 14718;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings qw(FATAL all);
|
||||||
|
@@ -2081,3 +2081,10 @@ SKIP:
|
||||||
|
fresh_perl_like('pack "c10f1073741824"', qr/Out of memory during pack/, { stderr => 1 },
|
||||||
|
"integer overflow calculating allocation (multiply)");
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+{
|
||||||
|
+ # [perl #132655] heap-buffer-overflow READ of size 11
|
||||||
|
+ # only expect failure under ASAN (and maybe valgrind)
|
||||||
|
+ fresh_perl_is('0.0 + unpack("u", "ab")', "", { stderr => 1 },
|
||||||
|
+ "ensure unpack u of invalid data nul terminates result");
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
74
perl-132683-don-t-try-to-convert-PL_sv_placeholder-i.patch
Normal file
74
perl-132683-don-t-try-to-convert-PL_sv_placeholder-i.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From 2460a4968c375f226973ba7e7e5fe6cf5a997ddb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Wed, 21 Feb 2018 16:24:08 +1100
|
||||||
|
Subject: [PATCH] (perl #132683) don't try to convert PL_sv_placeholder into a
|
||||||
|
CV
|
||||||
|
|
||||||
|
Constant folding sets PL_warnhook to PERL_WARNHOOK_FATAL, which is
|
||||||
|
&PL_sv_placeholder, an undef SV.
|
||||||
|
|
||||||
|
If warn() is called while constant folding, invoke_exception_hook()
|
||||||
|
attempts to use the value of a non-NULL PL_warnhook as a CV, which
|
||||||
|
caused an undefined value warning.
|
||||||
|
|
||||||
|
invoke_exception_hook() now treats a PL_warnhook of PERL_WARNHOOK_FATAL
|
||||||
|
the same as NULL, falling back to the normal warning handling which
|
||||||
|
throws an exception to abort constant folding.
|
||||||
|
---
|
||||||
|
t/lib/warnings/util | 29 +++++++++++++++++++++++++++++
|
||||||
|
util.c | 2 +-
|
||||||
|
2 files changed, 30 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/t/lib/warnings/util b/t/lib/warnings/util
|
||||||
|
index e82d6a6617..92be6efa73 100644
|
||||||
|
--- a/t/lib/warnings/util
|
||||||
|
+++ b/t/lib/warnings/util
|
||||||
|
@@ -106,3 +106,32 @@ no warnings 'portable' ;
|
||||||
|
$a = oct "0047777777777" ;
|
||||||
|
EXPECT
|
||||||
|
Octal number > 037777777777 non-portable at - line 5.
|
||||||
|
+########
|
||||||
|
+# util.c
|
||||||
|
+# NAME 132683: Use of uninitialized value" in warn() with constant folding and overloaded numbers
|
||||||
|
+use strict;
|
||||||
|
+use warnings;
|
||||||
|
+
|
||||||
|
+package Foo;
|
||||||
|
+
|
||||||
|
+use overload log => sub {
|
||||||
|
+ warn "here\n"; # Use of uninitialized value in warn
|
||||||
|
+ CORE::log($_[0]->{value});
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+sub import {
|
||||||
|
+ overload::constant
|
||||||
|
+ integer => sub { __PACKAGE__->new($_[0]) };
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+sub new {
|
||||||
|
+ my ($class, $value) = @_;
|
||||||
|
+ bless {value => $value}, $class;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+package main;
|
||||||
|
+
|
||||||
|
+BEGIN { Foo->import }
|
||||||
|
+my $x = log(2);
|
||||||
|
+EXPECT
|
||||||
|
+here
|
||||||
|
diff --git a/util.c b/util.c
|
||||||
|
index 37a71a1a81..ff88a54bf6 100644
|
||||||
|
--- a/util.c
|
||||||
|
+++ b/util.c
|
||||||
|
@@ -1534,7 +1534,7 @@ S_invoke_exception_hook(pTHX_ SV *ex, bool warn)
|
||||||
|
/* sv_2cv might call Perl_croak() or Perl_warner() */
|
||||||
|
SV * const oldhook = *hook;
|
||||||
|
|
||||||
|
- if (!oldhook)
|
||||||
|
+ if (!oldhook || oldhook == PERL_WARNHOOK_FATAL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
ENTER;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
97
perl-133314-always-close-the-directory-handle-on-cle.patch
Normal file
97
perl-133314-always-close-the-directory-handle-on-cle.patch
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
From 3d5e9c119db6b727684fe75dfcfe5831c4351bec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Mon, 2 Jul 2018 10:43:19 +1000
|
||||||
|
Subject: [PATCH] (perl #133314) always close the directory handle on clean up
|
||||||
|
|
||||||
|
Previously the directory handle was only closed if the rest of the
|
||||||
|
magic free clean up is done, but in most success cases that code
|
||||||
|
doesn't run, leaking the directory handle.
|
||||||
|
|
||||||
|
So always close the directory if our AV is available.
|
||||||
|
---
|
||||||
|
doio.c | 56 +++++++++++++++++++++++++++++++-------------------------
|
||||||
|
1 file changed, 31 insertions(+), 25 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/doio.c b/doio.c
|
||||||
|
index 4b8923f77c..16daf9fd11 100644
|
||||||
|
--- a/doio.c
|
||||||
|
+++ b/doio.c
|
||||||
|
@@ -1163,44 +1163,50 @@ S_argvout_free(pTHX_ SV *io, MAGIC *mg) {
|
||||||
|
|
||||||
|
/* mg_obj can be NULL if a thread is created with the handle open, in which
|
||||||
|
case we leave any clean up to the parent thread */
|
||||||
|
- if (mg->mg_obj && IoIFP(io)) {
|
||||||
|
- SV **pid_psv;
|
||||||
|
+ if (mg->mg_obj) {
|
||||||
|
#ifdef ARGV_USE_ATFUNCTIONS
|
||||||
|
SV **dir_psv;
|
||||||
|
DIR *dir;
|
||||||
|
+
|
||||||
|
+ dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE);
|
||||||
|
+ assert(dir_psv && *dir_psv && SvIOK(*dir_psv));
|
||||||
|
+ dir = INT2PTR(DIR *, SvIV(*dir_psv));
|
||||||
|
#endif
|
||||||
|
- PerlIO *iop = IoIFP(io);
|
||||||
|
+ if (IoIFP(io)) {
|
||||||
|
+ SV **pid_psv;
|
||||||
|
+ PerlIO *iop = IoIFP(io);
|
||||||
|
|
||||||
|
- assert(SvTYPE(mg->mg_obj) == SVt_PVAV);
|
||||||
|
+ assert(SvTYPE(mg->mg_obj) == SVt_PVAV);
|
||||||
|
|
||||||
|
- pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE);
|
||||||
|
+ pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE);
|
||||||
|
|
||||||
|
- assert(pid_psv && *pid_psv);
|
||||||
|
+ assert(pid_psv && *pid_psv);
|
||||||
|
|
||||||
|
- if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) {
|
||||||
|
- /* if we get here the file hasn't been closed explicitly by the
|
||||||
|
- user and hadn't been closed implicitly by nextargv(), so
|
||||||
|
- abandon the edit */
|
||||||
|
- SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE);
|
||||||
|
- const char *temp_pv = SvPVX(*temp_psv);
|
||||||
|
+ if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) {
|
||||||
|
+ /* if we get here the file hasn't been closed explicitly by the
|
||||||
|
+ user and hadn't been closed implicitly by nextargv(), so
|
||||||
|
+ abandon the edit */
|
||||||
|
+ SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE);
|
||||||
|
+ const char *temp_pv = SvPVX(*temp_psv);
|
||||||
|
|
||||||
|
- assert(temp_psv && *temp_psv && SvPOK(*temp_psv));
|
||||||
|
- (void)PerlIO_close(iop);
|
||||||
|
- IoIFP(io) = IoOFP(io) = NULL;
|
||||||
|
+ assert(temp_psv && *temp_psv && SvPOK(*temp_psv));
|
||||||
|
+ (void)PerlIO_close(iop);
|
||||||
|
+ IoIFP(io) = IoOFP(io) = NULL;
|
||||||
|
#ifdef ARGV_USE_ATFUNCTIONS
|
||||||
|
- dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE);
|
||||||
|
- assert(dir_psv && *dir_psv && SvIOK(*dir_psv));
|
||||||
|
- dir = INT2PTR(DIR *, SvIV(*dir_psv));
|
||||||
|
- if (dir) {
|
||||||
|
- if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 &&
|
||||||
|
- NotSupported(errno))
|
||||||
|
- (void)UNLINK(temp_pv);
|
||||||
|
- closedir(dir);
|
||||||
|
- }
|
||||||
|
+ if (dir) {
|
||||||
|
+ if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 &&
|
||||||
|
+ NotSupported(errno))
|
||||||
|
+ (void)UNLINK(temp_pv);
|
||||||
|
+ }
|
||||||
|
#else
|
||||||
|
- (void)UNLINK(temp_pv);
|
||||||
|
+ (void)UNLINK(temp_pv);
|
||||||
|
#endif
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
+#ifdef ARGV_USE_ATFUNCTIONS
|
||||||
|
+ if (dir)
|
||||||
|
+ closedir(dir);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
76
perl-133314-test-for-handle-leaks-from-in-place-edit.patch
Normal file
76
perl-133314-test-for-handle-leaks-from-in-place-edit.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
From 028f02e7e97a6026ba9ef084c3803ea08d36aa5b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Wed, 1 Aug 2018 11:55:22 +1000
|
||||||
|
Subject: [PATCH] (perl #133314) test for handle leaks from in-place editing
|
||||||
|
|
||||||
|
---
|
||||||
|
t/io/nargv.t | 46 +++++++++++++++++++++++++++++++++++++++++++++-
|
||||||
|
1 file changed, 45 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/t/io/nargv.t b/t/io/nargv.t
|
||||||
|
index 598ceed617..4482572aeb 100644
|
||||||
|
--- a/t/io/nargv.t
|
||||||
|
+++ b/t/io/nargv.t
|
||||||
|
@@ -6,7 +6,7 @@ BEGIN {
|
||||||
|
set_up_inc('../lib');
|
||||||
|
}
|
||||||
|
|
||||||
|
-print "1..6\n";
|
||||||
|
+print "1..7\n";
|
||||||
|
|
||||||
|
my $j = 1;
|
||||||
|
for $i ( 1,2,5,4,3 ) {
|
||||||
|
@@ -84,6 +84,50 @@ sub other {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+{
|
||||||
|
+ # (perl #133314) directory handle leak
|
||||||
|
+ #
|
||||||
|
+ # We process a significant number of files here to make sure any
|
||||||
|
+ # leaks are significant
|
||||||
|
+ @ARGV = mkfiles(1 .. 10);
|
||||||
|
+ for my $file (@ARGV) {
|
||||||
|
+ open my $f, ">", $file;
|
||||||
|
+ print $f "\n";
|
||||||
|
+ close $f;
|
||||||
|
+ }
|
||||||
|
+ local $^I = ".bak";
|
||||||
|
+ local $_;
|
||||||
|
+ while (<>) {
|
||||||
|
+ s/^/foo/;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+{
|
||||||
|
+ # (perl #133314) directory handle leak
|
||||||
|
+ # We open three handles here because the file processing opened:
|
||||||
|
+ # - the original file
|
||||||
|
+ # - the output file, and finally
|
||||||
|
+ # - the directory
|
||||||
|
+ # so we need to open the first two to use up the slots used for the original
|
||||||
|
+ # and output files.
|
||||||
|
+ # This test assumes fd are allocated in the typical *nix way - lowest
|
||||||
|
+ # available, which I believe is the case for the Win32 CRTs too.
|
||||||
|
+ # If this turns out not to be the case this test will need to skip on
|
||||||
|
+ # such platforms or only run on a small set of known-good platforms.
|
||||||
|
+ my $tfile = mkfiles(1);
|
||||||
|
+ open my $f, "<", $tfile
|
||||||
|
+ or die "Cannot open temp: $!";
|
||||||
|
+ open my $f2, "<", $tfile
|
||||||
|
+ or die "Cannot open temp: $!";
|
||||||
|
+ open my $f3, "<", $tfile
|
||||||
|
+ or die "Cannot open temp: $!";
|
||||||
|
+ print +(fileno($f3) < 20 ? "ok" : "not ok"), " 7 check fd leak\n";
|
||||||
|
+ close $f;
|
||||||
|
+ close $f2;
|
||||||
|
+ close $f3;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
my @files;
|
||||||
|
sub mkfiles {
|
||||||
|
foreach (@_) {
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
From fa2f0dd5a7767223df10149d3f16d7ed7013e16f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Torsten Veller <tove@gentoo.org>
|
|
||||||
Date: Sat, 14 Apr 2012 13:49:18 +0200
|
|
||||||
Subject: Set libperl soname
|
|
||||||
|
|
||||||
Bug-Gentoo: https://bugs.gentoo.org/286840
|
|
||||||
|
|
||||||
Patch-Name: gentoo/create_libperl_soname.diff
|
|
||||||
---
|
|
||||||
Makefile.SH | 9 +++++++--
|
|
||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.SH b/Makefile.SH
|
|
||||||
index d1da0a0..7733a32 100755
|
|
||||||
--- a/Makefile.SH
|
|
||||||
+++ b/Makefile.SH
|
|
||||||
@@ -64,11 +64,11 @@ true)
|
|
||||||
${revision}.${patchlevel}.${subversion}"
|
|
||||||
case "$osvers" in
|
|
||||||
1[5-9]*|[2-9]*)
|
|
||||||
- shrpldflags="$shrpldflags -install_name `pwd`/\$@ -Xlinker -headerpad_max_install_names"
|
|
||||||
+ shrpldflags="$shrpldflags -install_name `pwd`/libperl.${revision}.${patchlevel}.dylib -Xlinker -headerpad_max_install_names"
|
|
||||||
exeldflags="-Xlinker -headerpad_max_install_names"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
- shrpldflags="$shrpldflags -install_name \$(shrpdir)/\$@"
|
|
||||||
+ shrpldflags="$shrpldflags -install_name \$(shrpdir)/libperl.${revision}.${patchlevel}.dylib"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
@@ -78,13 +78,15 @@ true)
|
|
||||||
;;
|
|
||||||
sunos*)
|
|
||||||
linklibperl="-lperl"
|
|
||||||
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
|
||||||
;;
|
|
||||||
netbsd*|freebsd[234]*|openbsd*|dragonfly*|bitrig*)
|
|
||||||
linklibperl="-L. -lperl"
|
|
||||||
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
|
||||||
;;
|
|
||||||
interix*)
|
|
||||||
linklibperl="-L. -lperl"
|
|
||||||
- shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
|
|
||||||
+ shrpldflags="$shrpldflags -Wl,--image-base,0x57000000 -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
|
||||||
;;
|
|
||||||
aix*)
|
|
||||||
case "$cc" in
|
|
||||||
@@ -127,6 +129,9 @@ true)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
+ linux*)
|
|
||||||
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
|
||||||
+ ;;
|
|
||||||
esac
|
|
||||||
case "$ldlibpthname" in
|
|
||||||
'') ;;
|
|
||||||
@ -1,7 +1,11 @@
|
|||||||
From 8067179e65a28d91f00df7d36778229a07514471 Mon Sep 17 00:00:00 2001
|
From f793042f2bac2ace9a5c0030b47b41c4db561a5b Mon Sep 17 00:00:00 2001
|
||||||
From: Jitka Plesnikova <jplesnik@redhat.com>
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
Date: Thu, 29 Apr 2021 12:21:18 +0200
|
Date: Fri, 6 Jun 2014 14:31:59 +0200
|
||||||
Subject: [PATCH] Destroy {GDBM,NDBM,ODBM,SDBM}_File objects only from original
|
Subject: [PATCH] Destroy {GDBM,NDBM,ODBM,SDBM}_File objects only from original
|
||||||
|
thread context
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
This patch fixes a crash when destroing a hash tied to a *_File
|
This patch fixes a crash when destroing a hash tied to a *_File
|
||||||
database after spawning a thread:
|
database after spawning a thread:
|
||||||
@ -16,17 +20,17 @@ This crashed or paniced depending on how perl was configured.
|
|||||||
|
|
||||||
Closes RT#61912.
|
Closes RT#61912.
|
||||||
|
|
||||||
Updated original ppisar's patch for perl 5.18.2
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
---
|
---
|
||||||
ext/GDBM_File/GDBM_File.xs | 20 ++++++++++++--------
|
ext/GDBM_File/GDBM_File.xs | 16 ++++++++++------
|
||||||
ext/NDBM_File/NDBM_File.xs | 16 ++++++++++------
|
ext/NDBM_File/NDBM_File.xs | 16 ++++++++++------
|
||||||
ext/ODBM_File/ODBM_File.xs | 18 +++++++++++-------
|
ext/ODBM_File/ODBM_File.xs | 18 +++++++++++-------
|
||||||
ext/SDBM_File/SDBM_File.xs | 4 +++-
|
ext/SDBM_File/SDBM_File.xs | 4 +++-
|
||||||
t/lib/dbmt_common.pl | 35 +++++++++++++++++++++++++++++++++++
|
t/lib/dbmt_common.pl | 35 +++++++++++++++++++++++++++++++++++
|
||||||
5 files changed, 71 insertions(+), 22 deletions(-)
|
5 files changed, 69 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
|
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
|
||||||
index cd0bb6f..0c395ac 100644
|
index 33e08e2..7160f54 100644
|
||||||
--- a/ext/GDBM_File/GDBM_File.xs
|
--- a/ext/GDBM_File/GDBM_File.xs
|
||||||
+++ b/ext/GDBM_File/GDBM_File.xs
|
+++ b/ext/GDBM_File/GDBM_File.xs
|
||||||
@@ -13,6 +13,7 @@
|
@@ -13,6 +13,7 @@
|
||||||
@ -37,7 +41,7 @@ index cd0bb6f..0c395ac 100644
|
|||||||
GDBM_FILE dbp ;
|
GDBM_FILE dbp ;
|
||||||
SV * filter[4];
|
SV * filter[4];
|
||||||
int filtering ;
|
int filtering ;
|
||||||
@@ -276,6 +277,7 @@ gdbm_TIEHASH(dbtype, name, read_write, mode)
|
@@ -98,6 +99,7 @@ gdbm_TIEHASH(dbtype, name, read_write, m
|
||||||
}
|
}
|
||||||
if (dbp) {
|
if (dbp) {
|
||||||
RETVAL = (GDBM_File)safecalloc(1, sizeof(GDBM_File_type));
|
RETVAL = (GDBM_File)safecalloc(1, sizeof(GDBM_File_type));
|
||||||
@ -45,34 +49,29 @@ index cd0bb6f..0c395ac 100644
|
|||||||
RETVAL->dbp = dbp;
|
RETVAL->dbp = dbp;
|
||||||
} else {
|
} else {
|
||||||
RETVAL = NULL;
|
RETVAL = NULL;
|
||||||
@@ -289,15 +291,17 @@ gdbm_DESTROY(db)
|
@@ -118,12 +120,14 @@ gdbm_DESTROY(db)
|
||||||
PREINIT:
|
PREINIT:
|
||||||
int i = store_value;
|
int i = store_value;
|
||||||
CODE:
|
CODE:
|
||||||
- if (gdbm_file_close(db)) {
|
- gdbm_close(db);
|
||||||
- croak("gdbm_close: %s; %s", gdbm_strerror(gdbm_errno),
|
|
||||||
- strerror(errno));
|
|
||||||
+ if (db && db->owner == aTHX) {
|
|
||||||
+ if (gdbm_file_close(db)) {
|
|
||||||
+ croak("gdbm_close: %s; %s", gdbm_strerror(gdbm_errno),
|
|
||||||
+ strerror(errno));
|
|
||||||
+ }
|
|
||||||
+ do {
|
|
||||||
+ if (db->filter[i])
|
|
||||||
+ SvREFCNT_dec(db->filter[i]);
|
|
||||||
+ } while (i-- > 0);
|
|
||||||
+ safefree(db);
|
|
||||||
}
|
|
||||||
- do {
|
- do {
|
||||||
- if (db->filter[i])
|
- if (db->filter[i])
|
||||||
- SvREFCNT_dec(db->filter[i]);
|
- SvREFCNT_dec(db->filter[i]);
|
||||||
- } while (i-- > 0);
|
- } while (i-- > 0);
|
||||||
- safefree(db);
|
- safefree(db);
|
||||||
|
+ if (db && db->owner == aTHX) {
|
||||||
|
+ gdbm_close(db);
|
||||||
|
+ do {
|
||||||
|
+ if (db->filter[i])
|
||||||
|
+ SvREFCNT_dec(db->filter[i]);
|
||||||
|
+ } while (i-- > 0);
|
||||||
|
+ safefree(db);
|
||||||
|
+ }
|
||||||
|
|
||||||
void
|
#define gdbm_FETCH(db,key) gdbm_fetch(db->dbp,key)
|
||||||
gdbm_UNTIE(db, count)
|
datum_value
|
||||||
diff --git a/ext/NDBM_File/NDBM_File.xs b/ext/NDBM_File/NDBM_File.xs
|
diff --git a/ext/NDBM_File/NDBM_File.xs b/ext/NDBM_File/NDBM_File.xs
|
||||||
index eed671a..651fe0f 100644
|
index 52e60fc..af223e5 100644
|
||||||
--- a/ext/NDBM_File/NDBM_File.xs
|
--- a/ext/NDBM_File/NDBM_File.xs
|
||||||
+++ b/ext/NDBM_File/NDBM_File.xs
|
+++ b/ext/NDBM_File/NDBM_File.xs
|
||||||
@@ -33,6 +33,7 @@ END_EXTERN_C
|
@@ -33,6 +33,7 @@ END_EXTERN_C
|
||||||
@ -104,7 +103,7 @@ index eed671a..651fe0f 100644
|
|||||||
+ if (db && db->owner == aTHX) {
|
+ if (db && db->owner == aTHX) {
|
||||||
+ dbm_close(db->dbp);
|
+ dbm_close(db->dbp);
|
||||||
+ do {
|
+ do {
|
||||||
+ if (db->filter[i])
|
+ if (db->filter[i])
|
||||||
+ SvREFCNT_dec(db->filter[i]);
|
+ SvREFCNT_dec(db->filter[i]);
|
||||||
+ } while (i-- > 0);
|
+ } while (i-- > 0);
|
||||||
+ safefree(db);
|
+ safefree(db);
|
||||||
@ -113,7 +112,7 @@ index eed671a..651fe0f 100644
|
|||||||
#define ndbm_FETCH(db,key) dbm_fetch(db->dbp,key)
|
#define ndbm_FETCH(db,key) dbm_fetch(db->dbp,key)
|
||||||
datum_value
|
datum_value
|
||||||
diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs
|
diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs
|
||||||
index 38e6dbf..4b15a42 100644
|
index d1ece7f..f7e00a0 100644
|
||||||
--- a/ext/ODBM_File/ODBM_File.xs
|
--- a/ext/ODBM_File/ODBM_File.xs
|
||||||
+++ b/ext/ODBM_File/ODBM_File.xs
|
+++ b/ext/ODBM_File/ODBM_File.xs
|
||||||
@@ -49,6 +49,7 @@ datum nextkey(datum key);
|
@@ -49,6 +49,7 @@ datum nextkey(datum key);
|
||||||
@ -147,7 +146,7 @@ index 38e6dbf..4b15a42 100644
|
|||||||
+ dbmrefcnt--;
|
+ dbmrefcnt--;
|
||||||
+ dbmclose();
|
+ dbmclose();
|
||||||
+ do {
|
+ do {
|
||||||
+ if (db->filter[i])
|
+ if (db->filter[i])
|
||||||
+ SvREFCNT_dec(db->filter[i]);
|
+ SvREFCNT_dec(db->filter[i]);
|
||||||
+ } while (i-- > 0);
|
+ } while (i-- > 0);
|
||||||
+ safefree(db);
|
+ safefree(db);
|
||||||
@ -156,7 +155,7 @@ index 38e6dbf..4b15a42 100644
|
|||||||
datum_value
|
datum_value
|
||||||
odbm_FETCH(db, key)
|
odbm_FETCH(db, key)
|
||||||
diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs
|
diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs
|
||||||
index 0df2855..0e2bd58 100644
|
index 291e41b..0bdae9a 100644
|
||||||
--- a/ext/SDBM_File/SDBM_File.xs
|
--- a/ext/SDBM_File/SDBM_File.xs
|
||||||
+++ b/ext/SDBM_File/SDBM_File.xs
|
+++ b/ext/SDBM_File/SDBM_File.xs
|
||||||
@@ -10,6 +10,7 @@
|
@@ -10,6 +10,7 @@
|
||||||
@ -167,7 +166,7 @@ index 0df2855..0e2bd58 100644
|
|||||||
DBM * dbp ;
|
DBM * dbp ;
|
||||||
SV * filter[4];
|
SV * filter[4];
|
||||||
int filtering ;
|
int filtering ;
|
||||||
@@ -51,6 +52,7 @@ sdbm_TIEHASH(dbtype, filename, flags, mode, pagname=NULL)
|
@@ -51,6 +52,7 @@ sdbm_TIEHASH(dbtype, filename, flags, mode)
|
||||||
}
|
}
|
||||||
if (dbp) {
|
if (dbp) {
|
||||||
RETVAL = (SDBM_File)safecalloc(1, sizeof(SDBM_File_type));
|
RETVAL = (SDBM_File)safecalloc(1, sizeof(SDBM_File_type));
|
||||||
@ -185,7 +184,7 @@ index 0df2855..0e2bd58 100644
|
|||||||
sdbm_close(db->dbp);
|
sdbm_close(db->dbp);
|
||||||
do {
|
do {
|
||||||
diff --git a/t/lib/dbmt_common.pl b/t/lib/dbmt_common.pl
|
diff --git a/t/lib/dbmt_common.pl b/t/lib/dbmt_common.pl
|
||||||
index 60c66ae..a7f81fe 100644
|
index 5d4098c..a0a4d52 100644
|
||||||
--- a/t/lib/dbmt_common.pl
|
--- a/t/lib/dbmt_common.pl
|
||||||
+++ b/t/lib/dbmt_common.pl
|
+++ b/t/lib/dbmt_common.pl
|
||||||
@@ -510,5 +510,40 @@ unlink <Op_dbmx*>, $Dfile;
|
@@ -510,5 +510,40 @@ unlink <Op_dbmx*>, $Dfile;
|
||||||
@ -230,5 +229,5 @@ index 60c66ae..a7f81fe 100644
|
|||||||
done_testing();
|
done_testing();
|
||||||
1;
|
1;
|
||||||
--
|
--
|
||||||
2.26.3
|
1.9.3
|
||||||
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
From 9644657c4 10326749fd321d9c24944ec25afad2f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Thu, 20 Jun 2013 15:22:53 +0200
|
|
||||||
Subject: [PATCH] Install libperl.so to shrpdir on Linux
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
Configure | 7 ++++---
|
|
||||||
Makefile.SH | 2 +-
|
|
||||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Configure b/Configure
|
|
||||||
index 2f30261..825496e 100755
|
|
||||||
--- a/Configure
|
|
||||||
+++ b/Configure
|
|
||||||
@@ -8762,7 +8762,9 @@ esac
|
|
||||||
|
|
||||||
# Detect old use of shrpdir via undocumented Configure -Dshrpdir
|
|
||||||
case "$shrpdir" in
|
|
||||||
-'') ;;
|
|
||||||
+'')
|
|
||||||
+shrpdir=$archlibexp/CORE
|
|
||||||
+;;
|
|
||||||
*) $cat >&4 <<EOM
|
|
||||||
WARNING: Use of the shrpdir variable for the installation location of
|
|
||||||
the shared $libperl is not supported. It was never documented and
|
|
||||||
@@ -8792,7 +8794,6 @@ esac
|
|
||||||
# Add $xxx to ccdlflags.
|
|
||||||
# If we can't figure out a command-line option, use $shrpenv to
|
|
||||||
# set env LD_RUN_PATH. The main perl makefile uses this.
|
|
||||||
-shrpdir=$archlibexp/CORE
|
|
||||||
xxx=''
|
|
||||||
tmp_shrpenv=''
|
|
||||||
if "$useshrplib"; then
|
|
||||||
@@ -8807,7 +8808,7 @@ if "$useshrplib"; then
|
|
||||||
xxx="-Wl,-R$shrpdir"
|
|
||||||
;;
|
|
||||||
bsdos|linux|irix*|dec_osf|gnu*|haiku)
|
|
||||||
- xxx="-Wl,-rpath,$shrpdir"
|
|
||||||
+ # We want standard path
|
|
||||||
;;
|
|
||||||
hpux*)
|
|
||||||
# hpux doesn't like the default, either.
|
|
||||||
diff --git a/Makefile.SH b/Makefile.SH
|
|
||||||
index 7733a32..a481183 100755
|
|
||||||
--- a/Makefile.SH
|
|
||||||
+++ b/Makefile.SH
|
|
||||||
@@ -288,7 +288,7 @@ ranlib = $ranlib
|
|
||||||
# installman commandline.
|
|
||||||
bin = $installbin
|
|
||||||
scriptdir = $scriptdir
|
|
||||||
-shrpdir = $archlibexp/CORE
|
|
||||||
+shrpdir = $shrpdir
|
|
||||||
privlib = $installprivlib
|
|
||||||
man1dir = $man1dir
|
|
||||||
man1ext = $man1ext
|
|
||||||
--
|
|
||||||
1.8.1.4
|
|
||||||
@ -1,110 +0,0 @@
|
|||||||
From 9575301256f67116eccdbb99b38fc804ba3dcf53 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Mon, 18 Apr 2016 16:24:03 +0200
|
|
||||||
Subject: [PATCH] Provide ExtUtils::MM methods as standalone
|
|
||||||
ExtUtils::MM::Utils
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
If you cannot afford depending on ExtUtils::MakeMaker, you can
|
|
||||||
depend on ExtUtils::MM::Utils instead.
|
|
||||||
|
|
||||||
<https://bugzilla.redhat.com/show_bug.cgi?id=1129443>
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
MANIFEST | 1 +
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm | 68 ++++++++++++++++++++++++
|
|
||||||
2 files changed, 69 insertions(+)
|
|
||||||
create mode 100644 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
|
|
||||||
|
|
||||||
diff --git a/MANIFEST b/MANIFEST
|
|
||||||
index 6af238c..d4f0c56 100644
|
|
||||||
--- a/MANIFEST
|
|
||||||
+++ b/MANIFEST
|
|
||||||
@@ -1037,6 +1037,7 @@ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS390.pm
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS390.pm MakeMaker methods for OS 390
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm MakeMaker methods for QNX
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm MakeMaker methods for Unix
|
|
||||||
+cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm Independed MM methods
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm MakeMaker methods for U/WIN
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm MakeMaker methods for VMS
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm MakeMaker methods for VOS
|
|
||||||
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..6bbc0d8
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
|
|
||||||
@@ -0,0 +1,68 @@
|
|
||||||
+package ExtUtils::MM::Utils;
|
|
||||||
+
|
|
||||||
+require 5.006;
|
|
||||||
+
|
|
||||||
+use strict;
|
|
||||||
+use vars qw($VERSION);
|
|
||||||
+$VERSION = '7.11_06';
|
|
||||||
+$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
|
|
||||||
+
|
|
||||||
+=head1 NAME
|
|
||||||
+
|
|
||||||
+ExtUtils::MM::Utils - ExtUtils::MM methods without dependency on ExtUtils::MakeMaker
|
|
||||||
+
|
|
||||||
+=head1 SYNOPSIS
|
|
||||||
+
|
|
||||||
+ require ExtUtils::MM::Utils;
|
|
||||||
+ MM->maybe_command($file);
|
|
||||||
+
|
|
||||||
+=head1 DESCRIPTION
|
|
||||||
+
|
|
||||||
+This is a collection of L<ExtUtils::MM> subroutines that are used by many
|
|
||||||
+other modules but that do not need full-featured L<ExtUtils::MakeMaker>. The
|
|
||||||
+issue with L<ExtUtils::MakeMaker> is it pulls in Perl header files and that is
|
|
||||||
+an overkill for small subroutines.
|
|
||||||
+
|
|
||||||
+An example is the L<IPC::Cmd> that caused installing GCC just because of
|
|
||||||
+three-line I<maybe_command()> from L<ExtUtils::MM_Unix>.
|
|
||||||
+
|
|
||||||
+The intentions is to use L<ExtUtils::MM::Utils> instead of
|
|
||||||
+L<ExtUtils::MakeMaker> for these trivial methods. You can still call them via
|
|
||||||
+L<MM> class name.
|
|
||||||
+
|
|
||||||
+=head1 METHODS
|
|
||||||
+
|
|
||||||
+=over 4
|
|
||||||
+
|
|
||||||
+=item maybe_command
|
|
||||||
+
|
|
||||||
+Returns true, if the argument is likely to be a command.
|
|
||||||
+
|
|
||||||
+=cut
|
|
||||||
+
|
|
||||||
+if (!exists $INC{'ExtUtils/MM.pm'}) {
|
|
||||||
+ *MM::maybe_command = *ExtUtils::MM::maybe_command = \&maybe_command;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+sub maybe_command {
|
|
||||||
+ my($self,$file) = @_;
|
|
||||||
+ return $file if -x $file && ! -d $file;
|
|
||||||
+ return;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+1;
|
|
||||||
+
|
|
||||||
+=back
|
|
||||||
+
|
|
||||||
+=head1 BUGS
|
|
||||||
+
|
|
||||||
+These methods are copied from L<ExtUtils::MM_Unix>. Other operating systems
|
|
||||||
+are not supported yet. The reason is this
|
|
||||||
+L<a hack for Linux
|
|
||||||
+distributions|https://bugzilla.redhat.com/show_bug.cgi?id=1129443>.
|
|
||||||
+
|
|
||||||
+=head1 SEE ALSO
|
|
||||||
+
|
|
||||||
+L<ExtUtils::MakeMaker>, L<ExtUtils::MM>
|
|
||||||
+
|
|
||||||
+=cut
|
|
||||||
--
|
|
||||||
2.5.5
|
|
||||||
|
|
||||||
BIN
perl-5.28.0.tar.xz
Normal file
BIN
perl-5.28.0.tar.xz
Normal file
Binary file not shown.
@ -1,66 +0,0 @@
|
|||||||
From 5051aebec66aa530a23c7842f5c77606f208134e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jani=20V=C3=A4limaa?= <wally@mageia.org>
|
|
||||||
Date: Sat, 18 Jan 2025 15:25:52 +0200
|
|
||||||
Subject: [PATCH] Link XS modules to libperl.so with EU::CBuilder on Linux
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Based on patch from Petr Písař <ppisar@redhat.com>
|
|
||||||
|
|
||||||
Patch is modified to use extra_linker_flags to pass -lperl after object .o files.
|
|
||||||
In that way -Wl,--as-needed linker flag doesn't strip libperl dependecy.
|
|
||||||
|
|
||||||
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
|
|
||||||
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
|
|
||||||
---
|
|
||||||
MANIFEST | 1 +
|
|
||||||
.../lib/ExtUtils/CBuilder/Platform/linux.pm | 24 +++++++++++++++++++
|
|
||||||
2 files changed, 25 insertions(+)
|
|
||||||
create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
|
||||||
|
|
||||||
diff --git a/MANIFEST b/MANIFEST
|
|
||||||
index 2eb9ca4..31bac12 100644
|
|
||||||
--- a/MANIFEST
|
|
||||||
+++ b/MANIFEST
|
|
||||||
@@ -4104,6 +4104,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm CBuilder method
|
|
||||||
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm CBuilder methods for cygwin
|
|
||||||
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm CBuilder methods for darwin
|
|
||||||
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm CBuilder methods for OSF
|
|
||||||
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm CBuilder methods for Linux
|
|
||||||
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm CBuilder methods for OS/2
|
|
||||||
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm CBuilder methods for Unix
|
|
||||||
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm CBuilder methods for VMS
|
|
||||||
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..060515a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
|
||||||
@@ -0,0 +1,24 @@
|
|
||||||
+package ExtUtils::CBuilder::Platform::linux;
|
|
||||||
+
|
|
||||||
+use strict;
|
|
||||||
+use ExtUtils::CBuilder::Platform::Unix;
|
|
||||||
+use File::Spec;
|
|
||||||
+
|
|
||||||
+use vars qw($VERSION @ISA);
|
|
||||||
+$VERSION = '0.280206';
|
|
||||||
+@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
|
|
||||||
+
|
|
||||||
+sub link {
|
|
||||||
+ my ($self, %args) = @_;
|
|
||||||
+
|
|
||||||
+ # Link XS modules to libperl.so explicitly because multiple
|
|
||||||
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
|
|
||||||
+ $args{extra_linker_flags} = [
|
|
||||||
+ '-lperl',
|
|
||||||
+ $self->split_like_shell($args{extra_linker_flags})
|
|
||||||
+ ];
|
|
||||||
+
|
|
||||||
+ return $self->SUPER::link(%args);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+1;
|
|
||||||
--
|
|
||||||
2.47.1
|
|
||||||
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
From fc1f8ac36c34c35bad84fb7b99a26ab83c9ba075 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Wed, 3 Jul 2013 12:59:09 +0200
|
|
||||||
Subject: [PATCH] Link XS modules to libperl.so with EU::MM on Linux
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
|
|
||||||
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 8 +++++++-
|
|
||||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
|
||||||
index a8b172f..a3fbce2 100644
|
|
||||||
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
|
||||||
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
|
||||||
@@ -30,6 +30,7 @@ BEGIN {
|
|
||||||
$Is{IRIX} = $^O eq 'irix';
|
|
||||||
$Is{NetBSD} = $^O eq 'netbsd';
|
|
||||||
$Is{Interix} = $^O eq 'interix';
|
|
||||||
+ $Is{Linux} = $^O eq 'linux';
|
|
||||||
$Is{SunOS4} = $^O eq 'sunos';
|
|
||||||
$Is{Solaris} = $^O eq 'solaris';
|
|
||||||
$Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
|
|
||||||
@@ -1028,7 +1029,7 @@ sub xs_make_dynamic_lib {
|
|
||||||
push(@m," \$(RM_F) \$\@\n");
|
|
||||||
|
|
||||||
my $libs = '$(LDLOADLIBS)';
|
|
||||||
- if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
|
||||||
+ if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
|
||||||
# Use nothing on static perl platforms, and to the flags needed
|
|
||||||
# to link against the shared libperl library on shared perl
|
|
||||||
# platforms. We peek at lddlflags to see if we need -Wl,-R
|
|
||||||
@@ -1041,6 +1042,11 @@ sub xs_make_dynamic_lib {
|
|
||||||
# The Android linker will not recognize symbols from
|
|
||||||
# libperl unless the module explicitly depends on it.
|
|
||||||
$libs .= ' "-L$(PERL_INC)" -lperl';
|
|
||||||
+ } else {
|
|
||||||
+ if ($ENV{PERL_CORE}) {
|
|
||||||
+ $libs .= ' "-L$(PERL_INC)"';
|
|
||||||
+ }
|
|
||||||
+ $libs .= ' -lperl';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.1.4
|
|
||||||
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:eca551caec3bc549a4e590c0015003790bdd1a604ffe19cc78ee631d51f7072e
|
|
||||||
size 13565448
|
|
||||||
28
perl.h-Add-parens-around-macro-arguments.patch
Normal file
28
perl.h-Add-parens-around-macro-arguments.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From ff58ca57f8442a7e2e74ab4a79a9e542f9a180e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Mon, 11 Jun 2018 13:26:24 -0600
|
||||||
|
Subject: [PATCH] perl.h: Add parens around macro arguments
|
||||||
|
|
||||||
|
Arguments used within macros need to be parenthesized in case they are
|
||||||
|
called with an expression. This commit changes
|
||||||
|
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG() to do that.
|
||||||
|
---
|
||||||
|
perl.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/perl.h b/perl.h
|
||||||
|
index 6f04c6facd..3e1f6cd571 100644
|
||||||
|
--- a/perl.h
|
||||||
|
+++ b/perl.h
|
||||||
|
@@ -5632,7 +5632,7 @@ typedef struct am_table_short AMTS;
|
||||||
|
# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send) \
|
||||||
|
STMT_START { /* Check if to warn before doing the conversion work */\
|
||||||
|
if (! PL_in_utf8_CTYPE_locale && ckWARN(WARN_LOCALE)) { \
|
||||||
|
- UV cp = utf8_to_uvchr_buf((U8 *) s, (U8 *) send, NULL); \
|
||||||
|
+ UV cp = utf8_to_uvchr_buf((U8 *) (s), (U8 *) (send), NULL); \
|
||||||
|
Perl_warner(aTHX_ packWARN(WARN_LOCALE), \
|
||||||
|
"Wide character (U+%" UVXf ") in %s", \
|
||||||
|
(cp == 0) \
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
323
perl.spec
323
perl.spec
@ -1,3 +1,4 @@
|
|||||||
|
%global perl_libdir %{_libdir}/perl5
|
||||||
%global perl_datadir %{_datadir}/perl5
|
%global perl_datadir %{_datadir}/perl5
|
||||||
%global perl_vendor_libdir %{perl_libdir}/vendor_perl
|
%global perl_vendor_libdir %{perl_libdir}/vendor_perl
|
||||||
%global perl_vendor_datadir %{perl_datadir}/vendor_perl
|
%global perl_vendor_datadir %{perl_datadir}/vendor_perl
|
||||||
@ -10,55 +11,70 @@
|
|||||||
%global __provides_exclude_from ^%{_libexecdir}/perl5-tests/.*$
|
%global __provides_exclude_from ^%{_libexecdir}/perl5-tests/.*$
|
||||||
%global __requires_exclude_from ^%{_libexecdir}/perl5-tests/.*$
|
%global __requires_exclude_from ^%{_libexecdir}/perl5-tests/.*$
|
||||||
|
|
||||||
%global __brp_clean_perl_files %{nil}
|
|
||||||
|
|
||||||
#provides module without verion, no need to provide
|
#provides module without verion, no need to provide
|
||||||
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\((charnames|DynaLoader|DB)\\)$
|
%global __provides_exclude perl\\((charnames|DynaLoader|DB)\\)$
|
||||||
|
|
||||||
%global perl_version 5.38.0
|
|
||||||
|
|
||||||
%global perl_compat perl(:MODULE_COMPAT_5.38.0)
|
|
||||||
|
|
||||||
%bcond_without systemtap
|
|
||||||
|
|
||||||
Name: perl
|
Name: perl
|
||||||
License: (GPL-1.0-or-later or Artistic-1.0-perl) and (GPL-2.0-or-later or Artistic-1.0-perl) and MIT and UCD and Public Domain and BSD
|
License: (GPL+ or Artistic) and (GPLv2+ or Artistic) and HSRL and MIT and UCD and Public Domain and BSD
|
||||||
Epoch: 4
|
Epoch: 4
|
||||||
Version: %{perl_version}
|
Version: 5.28.0
|
||||||
Release: 10
|
Release: 432
|
||||||
Summary: A highly capable, feature-rich programming language
|
Summary: A highly capable, feature-rich programming language
|
||||||
Url: https://www.perl.org/
|
Url: https://www.perl.org/
|
||||||
Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz
|
Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz
|
||||||
# adding files for perl-macros virtual package
|
|
||||||
Source1: macros.perl
|
|
||||||
Source2: README.macros
|
|
||||||
|
|
||||||
Patch1: perl-5.22.1-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch
|
# PATCH-FEATURE-OPENEULER
|
||||||
Patch2: perl-5.16.3-create_libperl_soname.patch
|
Patch1: change-lib-to-lib64.patch
|
||||||
Patch3: perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch
|
# PATCH-FEATURE-OPENEULER
|
||||||
Patch4: perl-5.34.0-Destroy-GDBM-NDBM-ODBM-SDBM-_File-objects-only-from-.patch
|
Patch3: disable-rpath-by-default.patch
|
||||||
Patch5: change-lib-to-lib64.patch
|
# PATCH-FIX-OPENEULER
|
||||||
Patch6: disable-rpath-by-default.patch
|
Patch5: create-libperl-soname.patch
|
||||||
Patch7: backport-CVE-2023-47100-CVE-2023-47038.patch
|
# PATCH-FIX-OPENEULER--rh#1107543, RT#61912
|
||||||
Patch8: backport-CVE-2023-47039.patch
|
Patch8: perl-5.18.2-Destroy-GDBM-NDBM-ODBM-SDBM-_File-objects-only-from-.patch
|
||||||
Patch9: perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch
|
# PATCH-FIX-OPENEULER--RT#133295
|
||||||
# Please note that Patch10 comes from mageia, which will put libperl.so into extra_linker_flags.
|
Patch12: delete-ext-GDBM_File-t-fatal.t.patch
|
||||||
# So it is different from redhat/fedora, which puts libperl.so into lddlflags
|
# PATCH-FIX-UPSTREAM--RT#133204, upstream 5.29.0
|
||||||
Patch10: perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
|
Patch13: Perl_my_setenv-handle-integer-wrap.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.0
|
||||||
|
Patch14: regexec.c-Call-macro-with-correct-args.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.0
|
||||||
|
Patch15: perl.h-Add-parens-around-macro-arguments.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--RT#133368, upstream 5.29.0
|
||||||
|
Patch16: treat-when-index-1-as-a-boolean-expression.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.0
|
||||||
|
Patch17: locale.c-Fix-conditional-compilation.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--RT#133314, upstream 5.29.1
|
||||||
|
Patch18: perl-133314-test-for-handle-leaks-from-in-place-edit.patch
|
||||||
|
Patch19: perl-133314-always-close-the-directory-handle-on-cle.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--Fix buffer overrun, upstream 5.29.1
|
||||||
|
Patch20: utf8.c-Make-safer-a-deprecated-function.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--Fix time race, upstream 5.29.1
|
||||||
|
Patch21: Time-HiRes-t-itimer.t-avoid-race-condition.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.1
|
||||||
|
Patch22: Fix-script-run-bug-1-followed-by-Thai-digit.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.1
|
||||||
|
Patch23: Update-Time-Piece-to-CPAN-version-1.33.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- RT#133441, upstream 5.29.2
|
||||||
|
Patch24: multiconcat-mutator-not-seen-in-lex.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- RT#132683, upstream 5.29.2
|
||||||
|
Patch25: perl-132683-don-t-try-to-convert-PL_sv_placeholder-i.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- RT#132655, upstream 5.29.2
|
||||||
|
Patch26: perl-132655-nul-terminate-result-of-unpack-u-of-inva.patch
|
||||||
|
# PATCH-FIX-OPENEULER
|
||||||
|
# In 2020, a year of 70 starts to mean 2070. So cpan/Time-Local/t/Local.t test
|
||||||
|
Patch27: Fix-time-local-tests-in-2020.patch
|
||||||
|
|
||||||
Patch6000: backport-aarch64-ilp32-support.patch
|
Patch6000: CVE-2018-18312-1.patch
|
||||||
|
Patch6001: CVE-2018-18312-2.patch
|
||||||
|
Patch6002: CVE-2018-18312-3.patch
|
||||||
|
|
||||||
BuildRequires: gcc bash findutils coreutils make tar procps bzip2-devel gdbm-devel perl-File-Compare perl-File-Find
|
BuildRequires: gcc bash findutils coreutils make tar procps bzip2-devel gdbm-devel
|
||||||
BuildRequires: zlib-devel perl-interpreter perl-generators
|
BuildRequires: zlib-devel systemtap-sdt-devel perl-interpreter perl-generators
|
||||||
%if %{with systemtap}
|
|
||||||
BuildRequires: systemtap-sdt-devel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Requires: perl-libs = %{epoch}:%{version}-%{release}
|
Requires: perl(:MODULE_COMPAT_5.28.0) perl-version perl-threads perl-threads-shared perl-parent
|
||||||
Requires: perl-version perl-threads perl-threads-shared perl-parent
|
Requires: perl-devel = %{epoch}:%{version}-%{release} %{_vendor}-rpm-config
|
||||||
Requires: system-rpm-config
|
|
||||||
Requires: perl-Unicode-Collate perl-Unicode-Normalize perl-Time-Local perl-Time-HiRes
|
Requires: perl-Unicode-Collate perl-Unicode-Normalize perl-Time-Local perl-Time-HiRes
|
||||||
Requires: perl-Thread-Queue perl-Text-Tabs+Wrap perl-Test-Simple perl-Test-Harness
|
Requires: perl-Thread-Queue perl-Text-Tabs+Wrap perl-Test-Simple perl-Test-Harness perl-devel
|
||||||
Requires: perl-Text-Balanced perl-Text-ParseWords perl-Term-ANSIColor perl-Term-Cap
|
Requires: perl-Text-Balanced perl-Text-ParseWords perl-Term-ANSIColor perl-Term-Cap
|
||||||
Requires: perl-Socket perl-podlators perl-Scalar-List-Utils perl-perlfaq perl-constant
|
Requires: perl-Socket perl-podlators perl-Scalar-List-Utils perl-perlfaq perl-constant
|
||||||
Requires: perl-Digest-SHA perl-Digest perl-Digest-MD5 perl-Devel-PPPort perl-Carp perl-Env
|
Requires: perl-Digest-SHA perl-Digest perl-Digest-MD5 perl-Devel-PPPort perl-Carp perl-Env
|
||||||
@ -68,51 +84,35 @@ Requires: perl-File-Fetch perl-File-Path perl-File-Temp perl-Filter-Simple
|
|||||||
Requires: perl-IO-Compress perl-IO-Socket-IP perl-autodie perl-bignum perl-B-Debug perl-encoding
|
Requires: perl-IO-Compress perl-IO-Socket-IP perl-autodie perl-bignum perl-B-Debug perl-encoding
|
||||||
Requires: perl-Exporter perl-experimental perl-Compress-Raw-Bzip2 perl-Compress-Raw-Zlib perl-HTTP-Tiny
|
Requires: perl-Exporter perl-experimental perl-Compress-Raw-Bzip2 perl-Compress-Raw-Zlib perl-HTTP-Tiny
|
||||||
Requires: perl-Locale-Codes perl-Locale-Maketext perl-Math-BigInt perl-Math-BigInt-FastCalc perl-Math-BigRat
|
Requires: perl-Locale-Codes perl-Locale-Maketext perl-Math-BigInt perl-Math-BigInt-FastCalc perl-Math-BigRat
|
||||||
Requires: perl-Archive-Tar perl-Config-Perl-V perl-Data-Dumper perl-Getopt-Long perl-libnet
|
Requires: perl-Archive-Tar perl-Config-Perl-V perl-Data-Dumper perl-DB_File perl-Getopt-Long perl-libnet
|
||||||
Requires: perl-IPC-Cmd perl-IPC-SysV perl-JSON-PP perl-MIME-Base64 perl-Params-Check perl-Storable
|
Requires: perl-IPC-Cmd perl-IPC-SysV perl-JSON-PP perl-MIME-Base64 perl-Params-Check perl-Storable
|
||||||
Requires: perl-Pod-Checker perl-Pod-Escapes perl-Pod-Parser perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage
|
Requires: perl-Pod-Checker perl-Pod-Escapes perl-Pod-Parser perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage
|
||||||
Requires: perl-Module-CoreList perl-Module-CoreList-tools perl-Module-Load perl-Module-Load-Conditional
|
Requires: perl-Module-CoreList perl-Module-CoreList-tools perl-Module-Load perl-Module-Load-Conditional
|
||||||
Requires: perl-Module-Metadata perl-Sys-Syslog perl-PerlIO-via-QuotedPrint perl-Perl-OSType
|
Requires: perl-Module-Metadata perl-Sys-Syslog perl-PerlIO-via-QuotedPrint perl-Perl-OSType
|
||||||
|
|
||||||
Provides: perl-Attribute-Handlers perl-interpreter perl(bytes_heavy.pl) perl(dumpvar.pl) perl(perl5db.pl)
|
Provides: perl-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
Provides: perl-Attribute-Handlers perl-interpreter perl(bytes_heavy.pl) perl(dumpvar.pl) perl(perl5db.pl) perl(:VERSION) = 5.28.0
|
||||||
|
Provides: perl(:MODULE_COMPAT_5.28.0) perl(:WITH_64BIT) perl(:WITH_ITHREADS) perl(:WITH_THREADS) perl(:WITH_LARGEFILES)
|
||||||
|
Provides: perl-Errno perl(:WITH_PERLIO) perl(unicore::Name) perl(utf8_heavy.pl) perl-libs perl-macros perl-Memoize
|
||||||
Provides: perl-ExtUtils-Embed perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex
|
Provides: perl-ExtUtils-Embed perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex
|
||||||
Provides: perl-Module-Loaded perl-Net-Ping perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils
|
Provides: perl-Module-Loaded perl-Net-Ping perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils
|
||||||
Provides: perl-Errno perl-Memoize perl-File-Compare perl-File-Find
|
|
||||||
Provides: perl-macros = 2.0
|
|
||||||
|
|
||||||
Obsoletes: perl-Attribute-Handlers perl-interpreter perl-Errno perl-ExtUtils-Embed perl-Net-Ping
|
Obsoletes: perl-Attribute-Handlers perl-interpreter perl-libs perl-macros perl-Errno perl-ExtUtils-Embed perl-Net-Ping
|
||||||
Obsoletes: perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex perl-Memoize perl-Module-Loaded
|
Obsoletes: perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex perl-Memoize perl-Module-Loaded
|
||||||
Obsoletes: perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils perl-File-Compare perl-File-Find
|
Obsoletes: perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils
|
||||||
Obsoletes: perl-macros < 2.0
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Perl 5 is a highly capable, feature-rich programming language with over 30 years of development.
|
Perl 5 is a highly capable, feature-rich programming language with over 30 years of development.
|
||||||
Perl 5 runs on over 100 platforms from portables to mainframes and is suitable for both rapid
|
Perl 5 runs on over 100 platforms from portables to mainframes and is suitable for both rapid
|
||||||
prototyping and large scale development projects.
|
prototyping and large scale development projects.
|
||||||
|
|
||||||
%package libs
|
|
||||||
Summary: The libraries for the perl
|
|
||||||
License: (GPL-1.0-or-later or Artistic-1.0-perl) and MIT and UCD
|
|
||||||
Provides: %perl_compat
|
|
||||||
Provides: perl(:VERSION) = %{perl_version}
|
|
||||||
Provides: perl(:WITH_64BIT) perl(:WITH_ITHREADS) perl(:WITH_THREADS)
|
|
||||||
Provides: perl(:WITH_LARGEFILES) perl(:WITH_PERLIO) perl(unicore::Name)
|
|
||||||
Provides: perl(utf8_heavy.pl)
|
|
||||||
Requires: perl(Carp) perl(Exporter) perl(XSLoader)
|
|
||||||
|
|
||||||
%description libs
|
|
||||||
This package is the shared library for perl.
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
License: (GPL-1.0-or-later or Artistic-1.0-perl) and UCD
|
License: (GPL+ or Artistic) and UCD
|
||||||
|
|
||||||
Requires: perl = %{epoch}:%{version}-%{release} system-rpm-config
|
Requires: perl = %{epoch}:%{version}-%{release} system-rpm-config systemtap-sdt-devel
|
||||||
%if %{with systemtap}
|
Requires: perl(ExtUtils::ParseXS) perl(:MODULE_COMPAT_5.28.0) perl(Devel::PPPort)
|
||||||
Requires: systemtap-sdt-devel
|
|
||||||
%endif
|
|
||||||
Requires: perl(ExtUtils::ParseXS) perl(Devel::PPPort)
|
|
||||||
Requires: %perl_compat
|
|
||||||
|
|
||||||
Provides: perl-Devel-Peek perl-Devel-SelfStubber perl-tests
|
Provides: perl-Devel-Peek perl-Devel-SelfStubber perl-tests
|
||||||
|
|
||||||
@ -124,9 +124,7 @@ This package contains the development files and test files for %{name}.
|
|||||||
%package_help
|
%package_help
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{perl_version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
%global perl_abi %(echo '%{perl_version}' | sed 's/^\\([^.]*\\.[^.]*\\).*/\\1/')
|
|
||||||
echo %{perl_abi}
|
|
||||||
|
|
||||||
# Configure Compress::Zlib to use system zlib
|
# Configure Compress::Zlib to use system zlib
|
||||||
sed -i 's|BUILD_ZLIB = True|BUILD_ZLIB = False|
|
sed -i 's|BUILD_ZLIB = True|BUILD_ZLIB = False|
|
||||||
@ -151,10 +149,7 @@ sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST
|
|||||||
-Dvendorarch="%{perl_vendor_libdir}" -Darchname="%{_arch}-%{_os}-thread-multi" \
|
-Dvendorarch="%{perl_vendor_libdir}" -Darchname="%{_arch}-%{_os}-thread-multi" \
|
||||||
-Dlibpth="/usr/local/lib64 /lib64 %{_prefix}/lib64" \
|
-Dlibpth="/usr/local/lib64 /lib64 %{_prefix}/lib64" \
|
||||||
-Duseshrplib -Dusethreads -Duseithreads -Ui_ndbm -Di_gdbm \
|
-Duseshrplib -Dusethreads -Duseithreads -Ui_ndbm -Di_gdbm \
|
||||||
%if %{with systemtap}
|
-Dusedtrace='/usr/bin/dtrace' -Ubincompat5005 -Dusesitecustomize \
|
||||||
-Dusedtrace='/usr/bin/dtrace' \
|
|
||||||
%endif
|
|
||||||
-Ubincompat5005 -Dusesitecustomize \
|
|
||||||
-Duselargefiles -Dd_semctl_semun -Di_db -Duse64bitint \
|
-Duselargefiles -Dd_semctl_semun -Di_db -Duse64bitint \
|
||||||
-Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dscriptdir='%{_bindir}' \
|
-Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dscriptdir='%{_bindir}' \
|
||||||
-Dinstallusrbinperl=n -Uversiononly -Dpager='/usr/bin/less -isr' \
|
-Dinstallusrbinperl=n -Uversiononly -Dpager='/usr/bin/less -isr' \
|
||||||
@ -167,7 +162,7 @@ BZIP2_LIB=%{_libdir}
|
|||||||
export BUILD_BZIP2 BZIP2_LIB
|
export BUILD_BZIP2 BZIP2_LIB
|
||||||
|
|
||||||
# for new perl can be executed from make.
|
# for new perl can be executed from make.
|
||||||
%global soname libperl.so.%{perl_abi}
|
%global soname libperl.so.%(echo '%{version}' | sed 's/^\\([^.]*\\.[^.]*\\).*/\\1/')
|
||||||
test -L %{soname} || ln -s libperl.so %{soname}
|
test -L %{soname} || ln -s libperl.so %{soname}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -185,7 +180,7 @@ rm -f "%{buildroot}%{perl_libdir}/CORE/%{soname}"
|
|||||||
|
|
||||||
install -p -m 755 utils/pl2pm %{buildroot}%{_bindir}/pl2pm
|
install -p -m 755 utils/pl2pm %{buildroot}%{_bindir}/pl2pm
|
||||||
|
|
||||||
for h_file in sys/ioctl.h sys/syscall.h syscall.h
|
for h_file in asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h sys/socket.h sys/time.h wait.h
|
||||||
do
|
do
|
||||||
%{perl_new} %{buildroot}%{_bindir}/h2ph -a -d %{buildroot}%{perl_libdir} $h_file || true
|
%{perl_new} %{buildroot}%{_bindir}/h2ph -a -d %{buildroot}%{perl_libdir} $h_file || true
|
||||||
done
|
done
|
||||||
@ -202,6 +197,7 @@ ln -s ../../../bin/xsubpp %{buildroot}%{perl_datadir}/ExtUtils/
|
|||||||
|
|
||||||
rm %{buildroot}%{perl_libdir}/.packlist
|
rm %{buildroot}%{perl_libdir}/.packlist
|
||||||
|
|
||||||
|
# bug #973713
|
||||||
rm %{buildroot}/%{perl_libdir}/File/Spec/VMS.pm
|
rm %{buildroot}/%{perl_libdir}/File/Spec/VMS.pm
|
||||||
rm %{buildroot}%{_mandir}/man3/File::Spec::VMS.3*
|
rm %{buildroot}%{_mandir}/man3/File::Spec::VMS.3*
|
||||||
|
|
||||||
@ -214,11 +210,8 @@ done
|
|||||||
|
|
||||||
# fix shell bangs in tests.
|
# fix shell bangs in tests.
|
||||||
%{perl_new} -MConfig -i -pn \
|
%{perl_new} -MConfig -i -pn \
|
||||||
-e 's"\A#!(?:perl|\./perl|/perl|/usr/bin/perl|/usr/bin/env perl)\b"$Config{startperl}"' \
|
-e 's"\A#!(?:perl|\./perl|/usr/bin/perl|/usr/bin/env perl)\b"$Config{startperl}"' \
|
||||||
$(find %{buildroot}%{_libexecdir}/perl5-tests/perl-tests -type f)
|
$(find %{buildroot}%{_libexecdir}/perl5-tests/perl-tests -type f)
|
||||||
# install macros.perl file
|
|
||||||
install -D -m 644 %{SOURCE2} %{build}%{_rpmconfigdir}/macros.d/macros.perl
|
|
||||||
# not sure how to install README.macros
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{perl_new} -I/lib regen/lib_cleanup.pl
|
%{perl_new} -I/lib regen/lib_cleanup.pl
|
||||||
@ -233,7 +226,7 @@ make test_harness
|
|||||||
%files
|
%files
|
||||||
# there are many files do not need to be packaged
|
# there are many files do not need to be packaged
|
||||||
# in this main package
|
# in this main package
|
||||||
%exclude %{_bindir}/{h2xs,perlivp,corelist,prove,cpan,enc2xs,streamzip}
|
%exclude %{_bindir}/{h2xs,perlivp,corelist,prove,cpan,enc2xs}
|
||||||
%exclude %{_bindir}/{ptar,ptargrep,ptardiff,shasum,json_pp}
|
%exclude %{_bindir}/{ptar,ptargrep,ptardiff,shasum,json_pp}
|
||||||
%exclude %{_bindir}/{encguess,piconv,instmodsh,xsubpp,pod2text}
|
%exclude %{_bindir}/{encguess,piconv,instmodsh,xsubpp,pod2text}
|
||||||
%exclude %{_bindir}/{podchecker,podselect,perldoc,pod2usage,pod2man}
|
%exclude %{_bindir}/{podchecker,podselect,perldoc,pod2usage,pod2man}
|
||||||
@ -415,24 +408,6 @@ make test_harness
|
|||||||
%exclude %{perl_datadir}/{version.pm,version.pod}
|
%exclude %{perl_datadir}/{version.pm,version.pod}
|
||||||
%exclude %{perl_datadir}/version/
|
%exclude %{perl_datadir}/version/
|
||||||
|
|
||||||
#libs
|
|
||||||
%exclude %dir %{perl_libdir}
|
|
||||||
%exclude %dir %{perl_libdir}/auto
|
|
||||||
%exclude %{perl_libdir}/auto/re
|
|
||||||
%exclude %dir %{perl_libdir}/CORE
|
|
||||||
%exclude %{perl_libdir}/CORE/libperl.so
|
|
||||||
%exclude %{perl_libdir}/re.pm
|
|
||||||
%exclude %{_libdir}/libperl.so.*
|
|
||||||
%exclude %dir %{perl_vendor_libdir}
|
|
||||||
%exclude %dir %{perl_vendor_libdir}/auto
|
|
||||||
%exclude %dir %{perl_datadir}
|
|
||||||
%exclude %{perl_datadir}/{integer.pm,strict.pm,unicore,utf8.pm}
|
|
||||||
%exclude %{perl_datadir}/{utf8_heavy.pl,warnings.pm,XSLoader.pm}
|
|
||||||
%exclude %dir %{perl_vendor_datadir}
|
|
||||||
%dir %{perl_datadir}/File
|
|
||||||
%{perl_datadir}/File/Compare.pm
|
|
||||||
%{perl_datadir}/File/Find.pm
|
|
||||||
|
|
||||||
%license Artistic Copying
|
%license Artistic Copying
|
||||||
%doc AUTHORS
|
%doc AUTHORS
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
@ -440,26 +415,7 @@ make test_harness
|
|||||||
%{perl_libdir}/*
|
%{perl_libdir}/*
|
||||||
%dir %{perl_datadir}
|
%dir %{perl_datadir}
|
||||||
%{perl_datadir}/*
|
%{perl_datadir}/*
|
||||||
|
|
||||||
# macros
|
|
||||||
%{_rpmconfigdir}/macros.d/macros.perl
|
|
||||||
|
|
||||||
%files libs
|
|
||||||
%license Artistic Copying
|
|
||||||
%doc AUTHORS README Changes
|
|
||||||
%dir %{perl_libdir}
|
|
||||||
%dir %{perl_libdir}/auto
|
|
||||||
%{perl_libdir}/auto/re
|
|
||||||
%dir %{perl_libdir}/CORE
|
|
||||||
%{perl_libdir}/CORE/libperl.so
|
|
||||||
%{perl_libdir}/re.pm
|
|
||||||
%{_libdir}/libperl.so.*
|
%{_libdir}/libperl.so.*
|
||||||
%dir %{perl_vendor_libdir}
|
|
||||||
%dir %{perl_vendor_libdir}/auto
|
|
||||||
%dir %{perl_datadir}
|
|
||||||
%{perl_datadir}/{integer.pm,strict.pm,unicore,utf8.pm}
|
|
||||||
%{perl_datadir}/{utf8_heavy.pl,warnings.pm,XSLoader.pm}
|
|
||||||
%dir %{perl_vendor_datadir}
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_bindir}/{h2xs,perlivp}
|
%{_bindir}/{h2xs,perlivp}
|
||||||
@ -477,7 +433,7 @@ make test_harness
|
|||||||
# there are many man docs don not need to be packaged
|
# there are many man docs don not need to be packaged
|
||||||
%exclude %{_mandir}/man1/{ptar.1*,ptardiff.1*,ptargrep.1*,cpan.1*,shasum.1*,perlfilter.*}
|
%exclude %{_mandir}/man1/{ptar.1*,ptardiff.1*,ptargrep.1*,cpan.1*,shasum.1*,perlfilter.*}
|
||||||
%exclude %{_mandir}/man1/{encguess.1*,piconv.1*,enc2xs.1*,instmodsh.1*,xsubpp*,podchecker.*}
|
%exclude %{_mandir}/man1/{encguess.1*,piconv.1*,enc2xs.1*,instmodsh.1*,xsubpp*,podchecker.*}
|
||||||
%exclude %{_mandir}/man1/{zipdetails.*,json_pp.1*,corelist*,perlfaq*,perlglossary.*,streamzip.*}
|
%exclude %{_mandir}/man1/{zipdetails.*,json_pp.1*,corelist*,perlfaq*,perlglossary.*}
|
||||||
%exclude %{_mandir}/man1/{podselect.1*,perldoc.1*,pod2usage.*,pod2man.1*,pod2text.1*}
|
%exclude %{_mandir}/man1/{podselect.1*,perldoc.1*,pod2usage.*,pod2man.1*,pod2text.1*}
|
||||||
%exclude %{_mandir}/man1/{perlpodstyle.1*,prove.1*}
|
%exclude %{_mandir}/man1/{perlpodstyle.1*,prove.1*}
|
||||||
%exclude %{_mandir}/man3/{Archive::Tar*,autodie*,Fatal.3*,B::Debug.3*,Pod::Find.*}
|
%exclude %{_mandir}/man3/{Archive::Tar*,autodie*,Fatal.3*,B::Debug.3*,Pod::Find.*}
|
||||||
@ -508,142 +464,11 @@ make test_harness
|
|||||||
%exclude %{_mandir}/man3/{Time::HiRes.*,Time::Local.*,Socket.3*,threads.3*,threads::shared*,Unicode::Collate.*}
|
%exclude %{_mandir}/man3/{Time::HiRes.*,Time::Local.*,Socket.3*,threads.3*,threads::shared*,Unicode::Collate.*}
|
||||||
%exclude %{_mandir}/man3/{Unicode::Collate::*,Unicode::Normalize.*,version.3*,version::Internals.3*,Devel::PPPort*}
|
%exclude %{_mandir}/man3/{Unicode::Collate::*,Unicode::Normalize.*,version.3*,version::Internals.3*,Devel::PPPort*}
|
||||||
|
|
||||||
%doc README Changes
|
%doc README Changes
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jan 03 2025 Funda Wang <fundawang@yeah.net> - 4:5.38.0-10
|
|
||||||
- split out patch adding link to libperl.so into two separated patches,
|
|
||||||
and sync it with mageia, which is a better version than fedora
|
|
||||||
- disable cleaning empty perl directories
|
|
||||||
- use git lfs storage
|
|
||||||
|
|
||||||
* Tue Sep 3 2024 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0-9
|
|
||||||
- Delete the man of File::Compare and File::Find from the main package.
|
|
||||||
|
|
||||||
* Wed Aug 14 2024 gengqihu <gengqihu2@h-partners.com> - 4:5.38.0-8
|
|
||||||
- License info rectification
|
|
||||||
|
|
||||||
* Wed Jul 31 2024 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0-7
|
|
||||||
- sync patch from upstream
|
|
||||||
backport-aarch64-ilp32-support.patch
|
|
||||||
|
|
||||||
* Wed Mar 20 2024 zhangzikang <zhangzikang@kylinos.cn> - 4:5.38.0-6
|
|
||||||
- Fix perl re.so undefined symbol error
|
|
||||||
|
|
||||||
* Mon Dec 11 2023 huyubiao <huyubiao@huawei.com> - 4:5.38.0.5
|
|
||||||
- Fix CVE-2023-47100
|
|
||||||
|
|
||||||
* Fri Dec 8 2023 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0.4
|
|
||||||
- Fix CVE-2023-48039
|
|
||||||
|
|
||||||
* Mon Nov 27 2023 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0.3
|
|
||||||
- Fix CVE-2023-47038
|
|
||||||
|
|
||||||
* Fri Aug 25 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.38.0-2
|
|
||||||
- delete unused files and provides
|
|
||||||
|
|
||||||
* Mon Jul 31 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.38.0-1
|
|
||||||
- update version to 5.38.0
|
|
||||||
|
|
||||||
* Thu Jul 27 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.34.0-7
|
|
||||||
- add Perl_my_strlcpy-and-Perl_my_strlcat to fix build failed
|
|
||||||
|
|
||||||
* Mon Jun 26 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.34.0-6
|
|
||||||
- fix CVE-2023-31486
|
|
||||||
|
|
||||||
* Mon May 15 2023 dongyuzhen <dongyuzhen@h-partners.com> 4:5.34.0-5
|
|
||||||
- fix CVE-2023-31484
|
|
||||||
|
|
||||||
* Wed Jan 18 2023 yangmingtai <yangmingtai@huawei.com> 4:5.34.0-4
|
|
||||||
- fix compile failed caused by zlib update
|
|
||||||
|
|
||||||
* Fri Jul 01 2022 dongyuzhen <dongyuzhen@h-partners.com> 4:5.34.0-3
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:Add patches that are deleted during the upgrade
|
|
||||||
|
|
||||||
* Tue Mar 29 2022 zhouwenpei<zhouwenpei1@h-partners.com> 4:5.34.0-2
|
|
||||||
- Type:NA
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:add build conditions to control installing systemtap
|
|
||||||
|
|
||||||
* Fri Mar 18 2022 tianwei<tianwei12@h-partners.com> 4:5.34.0-1
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:upgrade version to 5.34.0
|
|
||||||
|
|
||||||
* Thu Feb 24 2022 yuanxin<yuanxin24@h-partners.com> 4:5.32.0-9
|
|
||||||
- Type:CVE
|
|
||||||
- ID:CVE-2021-36770
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:fix CVE-2021-36770
|
|
||||||
|
|
||||||
* Thu Aug 5 2021 yuanxin<yuanxin24@huawei.com> 4:5.32.0-8
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:remove perl-devel from perl
|
|
||||||
|
|
||||||
* Wed Aug 4 2021 yuanxin<yuanxin24@huawei.com> 4:5.32.0-7
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:remove other release-related information
|
|
||||||
|
|
||||||
* Thu Jul 22 2021 liudabo<liudabo1@huawei.com> 4:5.32.0-6
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:deleting gdb build dependency
|
|
||||||
|
|
||||||
* Tue Jun 29 2021 yuanxin<yuanxin24@huawei.com> - 4:5.32.0-5
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:remove perl-DB_File
|
|
||||||
|
|
||||||
* Tue Mar 30 2021 shenyangyang<shenyangyang4@huawei.com> - 4:5.32.0-4
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:Rebuild for openEuler-rpm-config moving /usr/lib/rpm/openEuler/xxxx
|
|
||||||
to /usr/lib/xxxx
|
|
||||||
|
|
||||||
* Wed Mar 03 2021 wuchaochao<wuchaochao4@huawei.com> - 4:5.32.0-3
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:fix backport-perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch
|
|
||||||
|
|
||||||
* Mon Aug 17 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.32.0-2
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:delete the temporary unneeded behavior for upgrade of perl
|
|
||||||
|
|
||||||
* Thu Aug 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.32.0-1
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:bump version to 5.32.0
|
|
||||||
|
|
||||||
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.28.0-434
|
|
||||||
- Type:NA
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:add build requires of gdb
|
|
||||||
|
|
||||||
* Tue Feb 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.28.0-433
|
|
||||||
- Type:NA
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:add subpackage perl-libs
|
|
||||||
|
|
||||||
* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.28.0-432
|
* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.28.0-432
|
||||||
- Type:NA
|
- Type:NA
|
||||||
- ID:NA
|
- ID:NA
|
||||||
@ -656,7 +481,7 @@ make test_harness
|
|||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESC:add macros that used for perl
|
- DESC:add macros that used for perl
|
||||||
|
|
||||||
* Thu Jan 2 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.28.0-430
|
* Fri Jan 2 2020 openEuler Buildteam <buildteam@openeuler.org> - 4:5.28.0-430
|
||||||
- Type:NA
|
- Type:NA
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: github
|
|
||||||
src_repo: Perl/perl5
|
|
||||||
tag_prefix: ^v
|
|
||||||
separator: .
|
|
||||||
27
regexec.c-Call-macro-with-correct-args.patch
Normal file
27
regexec.c-Call-macro-with-correct-args.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From e1a2878a55b1a7f11f19b384c4ea5235c29866b2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Mon, 11 Jun 2018 13:28:53 -0600
|
||||||
|
Subject: [PATCH] regexec.c: Call macro with correct args.
|
||||||
|
|
||||||
|
The second argument to this macro is a pointer to the end, as opposed to
|
||||||
|
a length.
|
||||||
|
---
|
||||||
|
regexec.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/regexec.c b/regexec.c
|
||||||
|
index 7ed8f4fabc..ba52ae97c7 100644
|
||||||
|
--- a/regexec.c
|
||||||
|
+++ b/regexec.c
|
||||||
|
@@ -1808,7 +1808,7 @@ STMT_START {
|
||||||
|
case trie_flu8: \
|
||||||
|
_CHECK_AND_WARN_PROBLEMATIC_LOCALE; \
|
||||||
|
if (UTF8_IS_ABOVE_LATIN1(*uc)) { \
|
||||||
|
- _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end - uc); \
|
||||||
|
+ _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end); \
|
||||||
|
} \
|
||||||
|
goto do_trie_utf8_fold; \
|
||||||
|
case trie_utf8_exactfa_fold: \
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
98
treat-when-index-1-as-a-boolean-expression.patch
Normal file
98
treat-when-index-1-as-a-boolean-expression.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From 6b877bbd2c071b3e0659fab552a74dc2ff7e08fb Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Sat, 14 Jul 2018 10:47:04 +0100
|
||||||
|
Subject: [PATCH] treat when(index() > -1) as a boolean expression
|
||||||
|
|
||||||
|
RT #133368
|
||||||
|
|
||||||
|
when(X) is normally compiled as when($_ ~~ X) *except* when X appears to
|
||||||
|
be a boolean expression, in which case it's used directly.
|
||||||
|
|
||||||
|
5.28.0 introduced an optimisation whereby comparisons involving index
|
||||||
|
like
|
||||||
|
|
||||||
|
index(...) != -1
|
||||||
|
|
||||||
|
eliminated the comparison, and pp_index() returned a boolean value
|
||||||
|
directly. This defeated the 'look for a boolean op' mechanism, and so
|
||||||
|
|
||||||
|
when(index(...) != -1)
|
||||||
|
|
||||||
|
and similar were being incorrectly compiled as
|
||||||
|
|
||||||
|
when($_ ~~ (index(...) != -1))
|
||||||
|
---
|
||||||
|
op.c | 8 +++++++-
|
||||||
|
t/op/switch.t | 23 ++++++++++++++++++++++-
|
||||||
|
2 files changed, 29 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/op.c b/op.c
|
||||||
|
index a05a1319d4..ddeb484b64 100644
|
||||||
|
--- a/op.c
|
||||||
|
+++ b/op.c
|
||||||
|
@@ -9072,6 +9072,13 @@ S_looks_like_bool(pTHX_ const OP *o)
|
||||||
|
case OP_FLOP:
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
+
|
||||||
|
+ case OP_INDEX:
|
||||||
|
+ case OP_RINDEX:
|
||||||
|
+ /* optimised-away (index() != -1) or similar comparison */
|
||||||
|
+ if (o->op_private & OPpTRUEBOOL)
|
||||||
|
+ return TRUE;
|
||||||
|
+ return FALSE;
|
||||||
|
|
||||||
|
case OP_CONST:
|
||||||
|
/* Detect comparisons that have been optimized away */
|
||||||
|
@@ -9081,7 +9088,6 @@ S_looks_like_bool(pTHX_ const OP *o)
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
-
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
diff --git a/t/op/switch.t b/t/op/switch.t
|
||||||
|
index e5385df0b4..6ff69e0bce 100644
|
||||||
|
--- a/t/op/switch.t
|
||||||
|
+++ b/t/op/switch.t
|
||||||
|
@@ -10,7 +10,7 @@ use strict;
|
||||||
|
use warnings;
|
||||||
|
no warnings 'experimental::smartmatch';
|
||||||
|
|
||||||
|
-plan tests => 195;
|
||||||
|
+plan tests => 197;
|
||||||
|
|
||||||
|
# The behaviour of the feature pragma should be tested by lib/feature.t
|
||||||
|
# using the tests in t/lib/feature/*. This file tests the behaviour of
|
||||||
|
@@ -1358,6 +1358,27 @@ given("xyz") {
|
||||||
|
"scalar value of false when";
|
||||||
|
}
|
||||||
|
|
||||||
|
+# RT #133368
|
||||||
|
+# index() and rindex() comparisons such as '> -1' are optimised away. Make
|
||||||
|
+# sure that they're still treated as a direct boolean expression rather
|
||||||
|
+# than when(X) being implicitly converted to when($_ ~~ X)
|
||||||
|
+
|
||||||
|
+{
|
||||||
|
+ my $s = "abc";
|
||||||
|
+ my $ok = 0;
|
||||||
|
+ given("xyz") {
|
||||||
|
+ when (index($s, 'a') > -1) { $ok = 1; }
|
||||||
|
+ }
|
||||||
|
+ ok($ok, "RT #133368 index");
|
||||||
|
+
|
||||||
|
+ $ok = 0;
|
||||||
|
+ given("xyz") {
|
||||||
|
+ when (rindex($s, 'a') > -1) { $ok = 1; }
|
||||||
|
+ }
|
||||||
|
+ ok($ok, "RT #133368 rindex");
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# Okay, that'll do for now. The intricacies of the smartmatch
|
||||||
|
# semantics are tested in t/op/smartmatch.t. Taintedness of
|
||||||
|
# returned values is checked in t/op/taint.t.
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
44
utf8.c-Make-safer-a-deprecated-function.patch
Normal file
44
utf8.c-Make-safer-a-deprecated-function.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 016c8ffcc6c9d41d145035ef5df607568880e3b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Tue, 24 Jul 2018 17:20:08 -0600
|
||||||
|
Subject: [PATCH] utf8.c: Make safer a deprecated function
|
||||||
|
|
||||||
|
This function is only called from deprecated functions, but they may be
|
||||||
|
moved to ppport.h. It is lacking a length parameter, so malformed UTF-8
|
||||||
|
may cause it to read beyond the buffer. This commit causes it to not
|
||||||
|
read beyond a NUL character, which makes it safe for the common case
|
||||||
|
that the input is a C string.
|
||||||
|
---
|
||||||
|
utf8.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/utf8.c b/utf8.c
|
||||||
|
index 8471fb8093..3062f58338 100644
|
||||||
|
--- a/utf8.c
|
||||||
|
+++ b/utf8.c
|
||||||
|
@@ -3100,7 +3100,9 @@ S_is_utf8_common(pTHX_ const U8 *const p, SV **swash,
|
||||||
|
* Note that it is assumed that the buffer length of <p> is enough to
|
||||||
|
* contain all the bytes that comprise the character. Thus, <*p> should
|
||||||
|
* have been checked before this call for mal-formedness enough to assure
|
||||||
|
- * that. */
|
||||||
|
+ * that. This function, does make sure to not look past any NUL, so it is
|
||||||
|
+ * safe to use on C, NUL-terminated, strings */
|
||||||
|
+ STRLEN len = my_strnlen((char *) p, UTF8SKIP(p));
|
||||||
|
|
||||||
|
PERL_ARGS_ASSERT_IS_UTF8_COMMON;
|
||||||
|
|
||||||
|
@@ -3109,9 +3111,8 @@ S_is_utf8_common(pTHX_ const U8 *const p, SV **swash,
|
||||||
|
* as far as there being enough bytes available in it to accommodate the
|
||||||
|
* character without reading beyond the end, and pass that number on to the
|
||||||
|
* validating routine */
|
||||||
|
- if (! isUTF8_CHAR(p, p + UTF8SKIP(p))) {
|
||||||
|
- _force_out_malformed_utf8_message(p, p + UTF8SKIP(p),
|
||||||
|
- _UTF8_NO_CONFIDENCE_IN_CURLEN,
|
||||||
|
+ if (! isUTF8_CHAR(p, p + len)) {
|
||||||
|
+ _force_out_malformed_utf8_message(p, p + len, _UTF8_NO_CONFIDENCE_IN_CURLEN,
|
||||||
|
1 /* Die */ );
|
||||||
|
NOT_REACHED; /* NOTREACHED */
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user