diff --git a/.gitignore b/.gitignore index 5d245cb..5b96920 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/perl-5.26.1.tar.bz2 +SOURCES/perl-5.26.3.tar.bz2 diff --git a/.rh-perl526-perl.metadata b/.rh-perl526-perl.metadata index d051b72..d4acfc7 100644 --- a/.rh-perl526-perl.metadata +++ b/.rh-perl526-perl.metadata @@ -1 +1 @@ -fadec45b7b48a06b3d2adab91c13f568dce717cd SOURCES/perl-5.26.1.tar.bz2 +4c61872bab631427cbb5b519ef8809d3a4c7f921 SOURCES/perl-5.26.3.tar.bz2 diff --git a/SOURCES/perl-5.26.1-fix-TRIE_READ_CHAR-and-DECL_TRIE_TYPE-to-acco.patch b/SOURCES/perl-5.26.1-fix-TRIE_READ_CHAR-and-DECL_TRIE_TYPE-to-acco.patch deleted file mode 100644 index 71c909f..0000000 --- a/SOURCES/perl-5.26.1-fix-TRIE_READ_CHAR-and-DECL_TRIE_TYPE-to-acco.patch +++ /dev/null @@ -1,78 +0,0 @@ -From d58a6811d830c2f2f850a03a18129c38cb732791 Mon Sep 17 00:00:00 2001 -From: Yves Orton -Date: Tue, 13 Feb 2018 16:11:55 +1100 -Subject: 5.26.1: fix TRIE_READ_CHAR and DECL_TRIE_TYPE to account for non-utf8 - target - ---- - regexec.c | 14 ++++++++++---- - t/re/re_tests | 1 + - 2 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/regexec.c b/regexec.c -index fa888823bd..cf81b07e30 100644 ---- a/regexec.c -+++ b/regexec.c -@@ -1472,7 +1472,7 @@ Perl_re_intuit_start(pTHX_ - #define DECL_TRIE_TYPE(scan) \ - const enum { trie_plain, trie_utf8, trie_utf8_fold, trie_latin_utf8_fold, \ - trie_utf8_exactfa_fold, trie_latin_utf8_exactfa_fold, \ -- trie_utf8l, trie_flu8 } \ -+ trie_utf8l, trie_flu8, trie_flu8_latin } \ - trie_type = ((scan->flags == EXACT) \ - ? (utf8_target ? trie_utf8 : trie_plain) \ - : (scan->flags == EXACTL) \ -@@ -1482,10 +1482,12 @@ Perl_re_intuit_start(pTHX_ - ? trie_utf8_exactfa_fold \ - : trie_latin_utf8_exactfa_fold) \ - : (scan->flags == EXACTFLU8 \ -- ? trie_flu8 \ -+ ? (utf8_target \ -+ ? trie_flu8 \ -+ : trie_flu8_latin) \ - : (utf8_target \ - ? trie_utf8_fold \ -- : trie_latin_utf8_fold))) -+ : trie_latin_utf8_fold))) - - /* 'uscan' is set to foldbuf, and incremented, so below the end of uscan is - * 'foldbuf+sizeof(foldbuf)' */ -@@ -1496,7 +1498,7 @@ STMT_START { - switch (trie_type) { \ - case trie_flu8: \ - _CHECK_AND_WARN_PROBLEMATIC_LOCALE; \ -- if (utf8_target && UTF8_IS_ABOVE_LATIN1(*uc)) { \ -+ if (UTF8_IS_ABOVE_LATIN1(*uc)) { \ - _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end - uc); \ - } \ - goto do_trie_utf8_fold; \ -@@ -1519,10 +1521,14 @@ STMT_START { - uscan = foldbuf + skiplen; \ - } \ - break; \ -+ case trie_flu8_latin: \ -+ _CHECK_AND_WARN_PROBLEMATIC_LOCALE; \ -+ goto do_trie_latin_utf8_fold; \ - case trie_latin_utf8_exactfa_fold: \ - flags |= FOLD_FLAGS_NOMIX_ASCII; \ - /* FALLTHROUGH */ \ - case trie_latin_utf8_fold: \ -+ do_trie_latin_utf8_fold: \ - if ( foldlen>0 ) { \ - uvc = utf8n_to_uvchr( (const U8*) uscan, foldlen, &len, uniflags ); \ - foldlen -= len; \ -diff --git a/t/re/re_tests b/t/re/re_tests -index 410fceadac..78baed6ffc 100644 ---- a/t/re/re_tests -+++ b/t/re/re_tests -@@ -1985,6 +1985,7 @@ AB\s+\x{100} AB \x{100}X y - - - /(?x)[a b]/xx \N{SPACE} yS $& # Note a space char here - /(?xx)[a b]/x \N{SPACE} n - - - /(?-x:[a b])/xx \N{SPACE} yS $& # Note a space char here -+(?il)\x{100}|\x{100}|\x{FF} \xFF y $& \xFF - - # Keep these lines at the end of the file - # vim: softtabstop=0 noexpandtab --- -2.11.0 - diff --git a/SOURCES/perl-5.26.1-perl-132063-Heap-buffer-overflow.patch b/SOURCES/perl-5.26.1-perl-132063-Heap-buffer-overflow.patch deleted file mode 100644 index c093f05..0000000 --- a/SOURCES/perl-5.26.1-perl-132063-Heap-buffer-overflow.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 7dc63e39d2d84920efd005092bc4d03b6ab24e1c Mon Sep 17 00:00:00 2001 -From: Karl Williamson -Date: Tue, 6 Feb 2018 14:50:48 -0700 -Subject: [perl #132063]: Heap buffer overflow - -The proximal cause is several instances in regexec.c of the code -assuming that the input was valid UTF-8, whereas the input was too short -for what the start byte claimed it would be. - -I grepped through the core for any other similar uses, and did not find -any. ---- - regexec.c | 33 ++++++++++++++++++--------------- - t/lib/warnings/regexec | 7 +++++++ - 2 files changed, 25 insertions(+), 15 deletions(-) - -diff --git a/regexec.c b/regexec.c -index 134b196fc4..fa888823bd 100644 ---- a/regexec.c -+++ b/regexec.c -@@ -1487,7 +1487,9 @@ Perl_re_intuit_start(pTHX_ - ? trie_utf8_fold \ - : trie_latin_utf8_fold))) - --#define REXEC_TRIE_READ_CHAR(trie_type, trie, widecharmap, uc, uscan, len, uvc, charid, foldlen, foldbuf, uniflags) \ -+/* 'uscan' is set to foldbuf, and incremented, so below the end of uscan is -+ * 'foldbuf+sizeof(foldbuf)' */ -+#define REXEC_TRIE_READ_CHAR(trie_type, trie, widecharmap, uc, uc_end, uscan, len, uvc, charid, foldlen, foldbuf, uniflags) \ - STMT_START { \ - STRLEN skiplen; \ - U8 flags = FOLD_FLAGS_FULL; \ -@@ -1495,7 +1497,7 @@ STMT_START { - case trie_flu8: \ - _CHECK_AND_WARN_PROBLEMATIC_LOCALE; \ - if (utf8_target && UTF8_IS_ABOVE_LATIN1(*uc)) { \ -- _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc + UTF8SKIP(uc)); \ -+ _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end - uc); \ - } \ - goto do_trie_utf8_fold; \ - case trie_utf8_exactfa_fold: \ -@@ -1504,14 +1506,14 @@ STMT_START { - case trie_utf8_fold: \ - do_trie_utf8_fold: \ - if ( foldlen>0 ) { \ -- uvc = utf8n_to_uvchr( (const U8*) uscan, UTF8_MAXLEN, &len, uniflags ); \ -+ uvc = utf8n_to_uvchr( (const U8*) uscan, foldlen, &len, uniflags ); \ - foldlen -= len; \ - uscan += len; \ - len=0; \ - } else { \ -- len = UTF8SKIP(uc); \ -- uvc = _toFOLD_utf8_flags( (const U8*) uc, uc + len, foldbuf, &foldlen, \ -+ uvc = _toFOLD_utf8_flags( (const U8*) uc, uc_end, foldbuf, &foldlen, \ - flags); \ -+ len = UTF8SKIP(uc); \ - skiplen = UVCHR_SKIP( uvc ); \ - foldlen -= skiplen; \ - uscan = foldbuf + skiplen; \ -@@ -1522,7 +1524,7 @@ STMT_START { - /* FALLTHROUGH */ \ - case trie_latin_utf8_fold: \ - if ( foldlen>0 ) { \ -- uvc = utf8n_to_uvchr( (const U8*) uscan, UTF8_MAXLEN, &len, uniflags ); \ -+ uvc = utf8n_to_uvchr( (const U8*) uscan, foldlen, &len, uniflags ); \ - foldlen -= len; \ - uscan += len; \ - len=0; \ -@@ -1541,7 +1543,7 @@ STMT_START { - } \ - /* FALLTHROUGH */ \ - case trie_utf8: \ -- uvc = utf8n_to_uvchr( (const U8*) uc, UTF8_MAXLEN, &len, uniflags ); \ -+ uvc = utf8n_to_uvchr( (const U8*) uc, uc_end - uc, &len, uniflags ); \ - break; \ - case trie_plain: \ - uvc = (UV)*uc; \ -@@ -2623,10 +2625,10 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, - } - points[pointpos++ % maxlen]= uc; - if (foldlen || uc < (U8*)strend) { -- REXEC_TRIE_READ_CHAR(trie_type, trie, -- widecharmap, uc, -- uscan, len, uvc, charid, foldlen, -- foldbuf, uniflags); -+ REXEC_TRIE_READ_CHAR(trie_type, trie, widecharmap, uc, -+ (U8 *) strend, uscan, len, uvc, -+ charid, foldlen, foldbuf, -+ uniflags); - DEBUG_TRIE_EXECUTE_r({ - dump_exec_pos( (char *)uc, c, strend, - real_start, s, utf8_target, 0); -@@ -5686,8 +5688,9 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) - if ( base && (foldlen || uc < (U8*)(reginfo->strend))) { - I32 offset; - REXEC_TRIE_READ_CHAR(trie_type, trie, widecharmap, uc, -- uscan, len, uvc, charid, foldlen, -- foldbuf, uniflags); -+ (U8 *) reginfo->strend, uscan, -+ len, uvc, charid, foldlen, -+ foldbuf, uniflags); - charcount++; - if (foldlen>0) - ST.longfold = TRUE; -@@ -5822,8 +5825,8 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) - while (foldlen) { - if (!--chars) - break; -- uvc = utf8n_to_uvchr(uscan, UTF8_MAXLEN, &len, -- uniflags); -+ uvc = utf8n_to_uvchr(uscan, foldlen, &len, -+ uniflags); - uscan += len; - foldlen -= len; - } -diff --git a/t/lib/warnings/regexec b/t/lib/warnings/regexec -index 900dd6ee7f..6635142dea 100644 ---- a/t/lib/warnings/regexec -+++ b/t/lib/warnings/regexec -@@ -260,3 +260,10 @@ setlocale(&POSIX::LC_CTYPE, $utf8_locale); - "k" =~ /(?[ \N{KELVIN SIGN} ])/i; - ":" =~ /(?[ \: ])/; - EXPECT -+######## -+# NAME perl #132063, read beyond buffer end -+# OPTION fatal -+"\xff" =~ /(?il)\x{100}|\x{100}/; -+EXPECT -+Malformed UTF-8 character: \xff (too short; 1 byte available, need 13) in pattern match (m//) at - line 2. -+Malformed UTF-8 character (fatal) at - line 2. --- -2.11.0 - diff --git a/SOURCES/perl-5.26.1-perl-132063-we-should-no-longer-warn-for-this-code.patch b/SOURCES/perl-5.26.1-perl-132063-we-should-no-longer-warn-for-this-code.patch deleted file mode 100644 index c8f5789..0000000 --- a/SOURCES/perl-5.26.1-perl-132063-we-should-no-longer-warn-for-this-code.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3c4ea4886efdb477335f6931d0a553e818ee172f Mon Sep 17 00:00:00 2001 -From: Tony Cook -Date: Mon, 19 Feb 2018 15:11:42 +1100 -Subject: (perl #132063) we should no longer warn for this code - -The first patch for 132063 prevented the buffer read overflow when -dumping the warning but didn't fix the underlying problem. - -The next change treats the supplied buffer correctly, preventing the -non-UTF-8 SV from being treated as UTF-8, preventing the warning. ---- - t/lib/warnings/regexec | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/t/lib/warnings/regexec b/t/lib/warnings/regexec -index 6635142dea..c370ddc3c7 100644 ---- a/t/lib/warnings/regexec -+++ b/t/lib/warnings/regexec -@@ -262,8 +262,5 @@ setlocale(&POSIX::LC_CTYPE, $utf8_locale); - EXPECT - ######## - # NAME perl #132063, read beyond buffer end --# OPTION fatal - "\xff" =~ /(?il)\x{100}|\x{100}/; - EXPECT --Malformed UTF-8 character: \xff (too short; 1 byte available, need 13) in pattern match (m//) at - line 2. --Malformed UTF-8 character (fatal) at - line 2. --- -2.11.0 - diff --git a/SOURCES/perl-5.26.1-perl-132227-restart-a-node-if-we-change-to-uni-rules.patch b/SOURCES/perl-5.26.1-perl-132227-restart-a-node-if-we-change-to-uni-rules.patch deleted file mode 100644 index 5325334..0000000 --- a/SOURCES/perl-5.26.1-perl-132227-restart-a-node-if-we-change-to-uni-rules.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6041b59a21326bd9c2d58034943f07233d5ac1ec Mon Sep 17 00:00:00 2001 -From: Karl Williamson -Date: Fri, 2 Feb 2018 15:14:27 -0700 -Subject: (perl #132227) restart a node if we change to uni rules within the - node and encounter a sharp S - -This could lead to a buffer overflow. ---- - regcomp.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/regcomp.c b/regcomp.c -index b2de7f05e1..943029b154 100644 ---- a/regcomp.c -+++ b/regcomp.c -@@ -13538,6 +13538,18 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) - * /u. This includes the multi-char fold SHARP S to - * 'ss' */ - if (UNLIKELY(ender == LATIN_SMALL_LETTER_SHARP_S)) { -+ -+ /* If the node started out having uni rules, we -+ * wouldn't have gotten here. So this means -+ * something in the middle has changed it, but -+ * didn't think it needed to reparse. But this -+ * sharp s now does indicate the need for -+ * reparsing. */ -+ if (RExC_uni_semantics) { -+ p = oldp; -+ goto loopdone; -+ } -+ - RExC_seen_unfolded_sharp_s = 1; - maybe_exactfu = FALSE; - } --- -2.11.0 - diff --git a/SOURCES/perl-5.26.1-utf8.c-Don-t-dump-malformation-past-first-NUL.patch b/SOURCES/perl-5.26.1-utf8.c-Don-t-dump-malformation-past-first-NUL.patch deleted file mode 100644 index 8315a5c..0000000 --- a/SOURCES/perl-5.26.1-utf8.c-Don-t-dump-malformation-past-first-NUL.patch +++ /dev/null @@ -1,67 +0,0 @@ -From d72ba890c8d8ac800c9d00a1f542deca11551f33 Mon Sep 17 00:00:00 2001 -From: Karl Williamson -Date: Tue, 13 Feb 2018 07:03:43 -0700 -Subject: utf8.c: Don't dump malformation past first NUL - -When a UTF-8 string contains a malformation, the bytes are dumped out as -a debugging aid. One should exercise caution, however, and not dump out -bytes that are actually past the end of the string. Commit 99a765e9e37 -from 2016 added the capability to signal to the dumping routines that -we're not sure where the string ends, and to dump the minimal possible. - -It occurred to me that an additional safety measure can be easily added, -which this commit does. And that is, in the dumping routines to stop at -the first NUL. All strings automatically get a traiing NUL added, even -if they contain embedded NULs. A NUL can never be part of a -malformation, and so its presence likely signals the end of the string. ---- - utf8.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/utf8.c b/utf8.c -index a3d5f61b64..61346f0cb6 100644 ---- a/utf8.c -+++ b/utf8.c -@@ -810,7 +810,7 @@ Perl__byte_dump_string(pTHX_ const U8 * s, const STRLEN len, const bool format) - PERL_STATIC_INLINE char * - S_unexpected_non_continuation_text(pTHX_ const U8 * const s, - -- /* How many bytes to print */ -+ /* Max number of bytes to print */ - STRLEN print_len, - - /* Which one is the non-continuation */ -@@ -826,6 +826,8 @@ S_unexpected_non_continuation_text(pTHX_ const U8 * const s, - ? "immediately" - : Perl_form(aTHX_ "%d bytes", - (int) non_cont_byte_pos); -+ const U8 * x = s + non_cont_byte_pos; -+ const U8 * e = s + print_len; - - PERL_ARGS_ASSERT_UNEXPECTED_NON_CONTINUATION_TEXT; - -@@ -833,10 +835,20 @@ S_unexpected_non_continuation_text(pTHX_ const U8 * const s, - * calculated, it's likely faster to pass it; verify under DEBUGGING */ - assert(expect_len == UTF8SKIP(s)); - -+ /* As a defensive coding measure, don't output anything past a NUL. Such -+ * bytes shouldn't be in the middle of a malformation, and could mark the -+ * end of the allocated string, and what comes after is undefined */ -+ for (; x < e; x++) { -+ if (*x == '\0') { -+ x++; /* Output this particular NUL */ -+ break; -+ } -+ } -+ - return Perl_form(aTHX_ "%s: %s (unexpected non-continuation byte 0x%02x," - " %s after start byte 0x%02x; need %d bytes, got %d)", - malformed_text, -- _byte_dump_string(s, print_len, 0), -+ _byte_dump_string(s, x - s, 0), - *(s + non_cont_byte_pos), - where, - *s, --- -2.11.0 - diff --git a/SOURCES/perl-5.26.2-RC1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch b/SOURCES/perl-5.26.2-RC1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch new file mode 100644 index 0000000..a7caf64 --- /dev/null +++ b/SOURCES/perl-5.26.2-RC1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch @@ -0,0 +1,143 @@ +From 07ebe9c4fb1028d17e61caabe8c15abd0cd48983 Mon Sep 17 00:00:00 2001 +From: Yves Orton +Date: Thu, 29 Jun 2017 11:31:14 +0200 +Subject: [PATCH] Parse caret vars with subscripts the same as normal vars + inside of ${..} escaping +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This behavior is discussed in perl #131664, which complains that +"${^CAPTURE}[0]" does not work as expected. Abigail explains the +behavior is by design and Eirik Berg Hanssen expands on that explanation +pointing out that what /should/ work, "${^CAPTURE[0]}" does not, +which Sawyer then ruled was a bug. + +So this patch makes "${^CAPTURE[0]}" (and "${^CAPTURE [0]}" [hi +abigial]) work the same as they would if the var was called @foo. + +Petr Písař: Ported to 5.26.2-RC1. + +Signed-off-by: Petr Písař +--- + t/base/lex.t | 28 +++++++++++++++++++++++++++- + toke.c | 46 +++++++++++++++++++++++++--------------------- + 2 files changed, 52 insertions(+), 22 deletions(-) + +diff --git a/t/base/lex.t b/t/base/lex.t +index 99fd3bb..ae17bbd 100644 +--- a/t/base/lex.t ++++ b/t/base/lex.t +@@ -1,6 +1,6 @@ + #!./perl + +-print "1..112\n"; ++print "1..119\n"; + + $x = 'x'; + +@@ -154,6 +154,32 @@ my $test = 31; + print "not " unless index ($@, 'Can\'t use global $^XYZ in "my"') > -1; + print "ok $test\n"; $test++; + # print "($@)\n" if $@; ++# ++ ${^TEST}= "splat"; ++ @{^TEST}= ("foo", "bar"); ++ %{^TEST}= ("foo" => "FOO", "bar" => "BAR" ); ++ ++ print "not " if "${^TEST}" ne "splat"; ++ print "ok $test\n"; $test++; ++ ++ print "not " if "${^TEST}[0]" ne "splat[0]"; ++ print "ok $test\n"; $test++; ++ ++ print "not " if "${^TEST[0]}" ne "foo"; ++ print "ok $test\n"; $test++; ++ ++ print "not " if "${ ^TEST [1] }" ne "bar"; ++ print "ok $test\n"; $test++; ++ ++ print "not " if "${^TEST}{foo}" ne "splat{foo}"; ++ print "ok $test\n"; $test++; ++ ++ print "not " if "${^TEST{foo}}" ne "FOO"; ++ print "ok $test\n"; $test++; ++ ++ print "not " if "${ ^TEST {bar} }" ne "BAR"; ++ print "ok $test\n"; $test++; ++ + + # Now let's make sure that caret variables are all forced into the main package. + package Someother; +diff --git a/toke.c b/toke.c +index ee9c464..aff785b 100644 +--- a/toke.c ++++ b/toke.c +@@ -9416,19 +9416,36 @@ S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) + bool skip; + char *s2; + /* If we were processing {...} notation then... */ +- if (isIDFIRST_lazy_if_safe(d, e, is_utf8)) { +- /* if it starts as a valid identifier, assume that it is one. +- (the later check for } being at the expected point will trap +- cases where this doesn't pan out.) */ +- d += is_utf8 ? UTF8SKIP(d) : 1; +- parse_ident(&s, &d, e, 1, is_utf8, TRUE); +- *d = '\0'; ++ if (isIDFIRST_lazy_if_safe(d, e, is_utf8) ++ || (!isPRINT(*d) /* isCNTRL(d), plus all non-ASCII */ ++ && isWORDCHAR(*s)) ++ ) { ++ /* note we have to check for a normal identifier first, ++ * as it handles utf8 symbols, and only after that has ++ * been ruled out can we look at the caret words */ ++ if (isIDFIRST_lazy_if_safe(d, e, is_utf8) ) { ++ /* if it starts as a valid identifier, assume that it is one. ++ (the later check for } being at the expected point will trap ++ cases where this doesn't pan out.) */ ++ d += is_utf8 ? UTF8SKIP(d) : 1; ++ parse_ident(&s, &d, e, 1, is_utf8, TRUE); ++ *d = '\0'; ++ } ++ else { /* caret word: ${^Foo} ${^CAPTURE[0]} */ ++ d++; ++ while (isWORDCHAR(*s) && d < e) { ++ *d++ = *s++; ++ } ++ if (d >= e) ++ Perl_croak(aTHX_ "%s", ident_too_long); ++ *d = '\0'; ++ } + tmp_copline = CopLINE(PL_curcop); + if (s < PL_bufend && isSPACE(*s)) { + s = skipspace(s); + } + if ((*s == '[' || (*s == '{' && strNE(dest, "sub")))) { +- /* ${foo[0]} and ${foo{bar}} notation. */ ++ /* ${foo[0]} and ${foo{bar}} and ${^CAPTURE[0]} notation. */ + if (ckWARN(WARN_AMBIGUOUS) && keyword(dest, d - dest, 0)) { + const char * const brack = + (const char *) +@@ -9447,19 +9464,6 @@ S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) + return s; + } + } +- /* Handle extended ${^Foo} variables +- * 1999-02-27 mjd-perl-patch@plover.com */ +- else if (! isPRINT(*d) /* isCNTRL(d), plus all non-ASCII */ +- && isWORDCHAR(*s)) +- { +- d++; +- while (isWORDCHAR(*s) && d < e) { +- *d++ = *s++; +- } +- if (d >= e) +- Perl_croak(aTHX_ "%s", ident_too_long); +- *d = '\0'; +- } + + if ( !tmp_copline ) + tmp_copline = CopLINE(PL_curcop); +-- +2.14.3 + diff --git a/SOURCES/perl-5.26.2-RC1-add-an-additional-test-for-whitespace-tolerance-in-c.patch b/SOURCES/perl-5.26.2-RC1-add-an-additional-test-for-whitespace-tolerance-in-c.patch new file mode 100644 index 0000000..3f7d885 --- /dev/null +++ b/SOURCES/perl-5.26.2-RC1-add-an-additional-test-for-whitespace-tolerance-in-c.patch @@ -0,0 +1,45 @@ +From edea384e57453b0a62de58445eed1fded18c1cca Mon Sep 17 00:00:00 2001 +From: Yves Orton +Date: Thu, 29 Jun 2017 13:20:49 +0200 +Subject: [PATCH] add an additional test for whitespace tolerance in caret + word-vars +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Petr Písař: Ported to 5.26.2-RC1. + +Signed-off-by: Petr Písař +--- + t/base/lex.t | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/t/base/lex.t b/t/base/lex.t +index ae17bbd..414aa1f 100644 +--- a/t/base/lex.t ++++ b/t/base/lex.t +@@ -1,6 +1,6 @@ + #!./perl + +-print "1..119\n"; ++print "1..120\n"; + + $x = 'x'; + +@@ -158,9 +158,12 @@ my $test = 31; + ${^TEST}= "splat"; + @{^TEST}= ("foo", "bar"); + %{^TEST}= ("foo" => "FOO", "bar" => "BAR" ); +- ++ + print "not " if "${^TEST}" ne "splat"; + print "ok $test\n"; $test++; ++ ++ print "not " if "${ ^TEST }" ne "splat"; ++ print "ok $test\n"; $test++; + + print "not " if "${^TEST}[0]" ne "splat[0]"; + print "ok $test\n"; $test++; +-- +2.14.3 + diff --git a/SOURCES/perl-5.27.0-perl-131221-improve-duplication-of-via-handles.patch b/SOURCES/perl-5.27.0-perl-131221-improve-duplication-of-via-handles.patch deleted file mode 100644 index 37da371..0000000 --- a/SOURCES/perl-5.27.0-perl-131221-improve-duplication-of-via-handles.patch +++ /dev/null @@ -1,299 +0,0 @@ -From 99b847695211f825df6299aa9da91f9494f741e2 Mon Sep 17 00:00:00 2001 -From: Tony Cook -Date: Thu, 1 Jun 2017 15:11:27 +1000 -Subject: [PATCH] [perl #131221] improve duplication of :via handles -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Previously duplication (as with open ... ">&...") would fail -unless the user supplied a GETARG, which wasn't documented, and -resulted in an attempt to free and unreferened scalar if supplied. - -Cloning on thread creation was simply broken. - -We now handle GETARG correctly, and provide a useful default if it -returns nothing. - -Cloning on thread creation now duplicates the appropriate parts of the -parent thread's handle. - -Signed-off-by: Petr Písař ---- - MANIFEST | 1 + - ext/PerlIO-via/t/thread.t | 73 +++++++++++++++++++++++++++++++++++++++++++++++ - ext/PerlIO-via/t/via.t | 56 +++++++++++++++++++++++++++++++++++- - ext/PerlIO-via/via.pm | 2 +- - ext/PerlIO-via/via.xs | 55 +++++++++++++++++++++++++++++++---- - 5 files changed, 179 insertions(+), 8 deletions(-) - create mode 100644 ext/PerlIO-via/t/thread.t - -diff --git a/MANIFEST b/MANIFEST -index 8c4950e..d39f992 100644 ---- a/MANIFEST -+++ b/MANIFEST -@@ -4056,6 +4056,7 @@ ext/PerlIO-scalar/scalar.xs PerlIO layer for scalars - ext/PerlIO-scalar/t/scalar.t See if PerlIO::scalar works - ext/PerlIO-scalar/t/scalar_ungetc.t Tests for PerlIO layer for scalars - ext/PerlIO-via/hints/aix.pl Hint for PerlIO::via for named architecture -+ext/PerlIO-via/t/thread.t See if PerlIO::via works with threads - ext/PerlIO-via/t/via.t See if PerlIO::via works - ext/PerlIO-via/via.pm PerlIO layer for layers in perl - ext/PerlIO-via/via.xs PerlIO layer for layers in perl -diff --git a/ext/PerlIO-via/t/thread.t b/ext/PerlIO-via/t/thread.t -new file mode 100644 -index 0000000..e4358f9 ---- /dev/null -+++ b/ext/PerlIO-via/t/thread.t -@@ -0,0 +1,73 @@ -+#!perl -+BEGIN { -+ unless (find PerlIO::Layer 'perlio') { -+ print "1..0 # Skip: not perlio\n"; -+ exit 0; -+ } -+ require Config; -+ unless ($Config::Config{'usethreads'}) { -+ print "1..0 # Skip -- need threads for this test\n"; -+ exit 0; -+ } -+ if (($Config::Config{'extensions'} !~ m!\bPerlIO/via\b!) ){ -+ print "1..0 # Skip -- Perl configured without PerlIO::via module\n"; -+ exit 0; -+ } -+} -+ -+use strict; -+use warnings; -+use threads; -+ -+my $tmp = "via$$"; -+ -+END { -+ 1 while unlink $tmp; -+} -+ -+use Test::More tests => 2; -+ -+our $push_count = 0; -+ -+{ -+ open my $fh, ">:via(Test1)", $tmp -+ or die "Cannot open $tmp: $!"; -+ $fh->autoflush; -+ -+ print $fh "AXAX"; -+ -+ # previously this would crash -+ threads->create( -+ sub { -+ print $fh "XZXZ"; -+ })->join; -+ -+ print $fh "BXBX"; -+ close $fh; -+ -+ open my $in, "<", $tmp; -+ my $line = <$in>; -+ close $in; -+ -+ is($line, "AYAYYZYZBYBY", "check thread data delivered"); -+ -+ is($push_count, 1, "PUSHED not called for dup on thread creation"); -+} -+ -+package PerlIO::via::Test1; -+ -+sub PUSHED { -+ my ($class) = @_; -+ ++$main::push_count; -+ bless {}, $class; -+} -+ -+sub WRITE { -+ my ($self, $data, $fh) = @_; -+ $data =~ tr/X/Y/; -+ $fh->autoflush; -+ print $fh $data; -+ return length $data; -+} -+ -+ -diff --git a/ext/PerlIO-via/t/via.t b/ext/PerlIO-via/t/via.t -index 6787e11..80577df 100644 ---- a/ext/PerlIO-via/t/via.t -+++ b/ext/PerlIO-via/t/via.t -@@ -17,7 +17,7 @@ use warnings; - - my $tmp = "via$$"; - --use Test::More tests => 18; -+use Test::More tests => 26; - - my $fh; - my $a = join("", map { chr } 0..255) x 10; -@@ -84,6 +84,60 @@ is( $obj, 'Foo', 'search for package Foo' ); - open $fh, '<:via(Bar)', "bar"; - is( $obj, 'PerlIO::via::Bar', 'search for package PerlIO::via::Bar' ); - -+{ -+ # [perl #131221] -+ ok(open(my $fh1, ">", $tmp), "open $tmp"); -+ ok(binmode($fh1, ":via(XXX)"), "binmode :via(XXX) onto it"); -+ ok(open(my $fh2, ">&", $fh1), "dup it"); -+ close $fh1; -+ close $fh2; -+ -+ # make sure the old workaround still works -+ ok(open($fh1, ">", $tmp), "open $tmp"); -+ ok(binmode($fh1, ":via(YYY)"), "binmode :via(YYY) onto it"); -+ ok(open($fh2, ">&", $fh1), "dup it"); -+ print $fh2 "XZXZ"; -+ close $fh1; -+ close $fh2; -+ -+ ok(open($fh1, "<", $tmp), "open $tmp for check"); -+ { local $/; $b = <$fh1> } -+ close $fh1; -+ is($b, "XZXZ", "check result is from non-filtering class"); -+ -+ package PerlIO::via::XXX; -+ -+ sub PUSHED { -+ my $class = shift; -+ bless {}, $class; -+ } -+ -+ sub WRITE { -+ my ($self, $buffer, $handle) = @_; -+ -+ print $handle $buffer; -+ return length($buffer); -+ } -+ package PerlIO::via::YYY; -+ -+ sub PUSHED { -+ my $class = shift; -+ bless {}, $class; -+ } -+ -+ sub WRITE { -+ my ($self, $buffer, $handle) = @_; -+ -+ $buffer =~ tr/X/Y/; -+ print $handle $buffer; -+ return length($buffer); -+ } -+ -+ sub GETARG { -+ "XXX"; -+ } -+} -+ - END { - 1 while unlink $tmp; - } -diff --git a/ext/PerlIO-via/via.pm b/ext/PerlIO-via/via.pm -index e477dcc..30083fe 100644 ---- a/ext/PerlIO-via/via.pm -+++ b/ext/PerlIO-via/via.pm -@@ -1,5 +1,5 @@ - package PerlIO::via; --our $VERSION = '0.16'; -+our $VERSION = '0.17'; - require XSLoader; - XSLoader::load(); - 1; -diff --git a/ext/PerlIO-via/via.xs b/ext/PerlIO-via/via.xs -index 8a7f1fc..61953c8 100644 ---- a/ext/PerlIO-via/via.xs -+++ b/ext/PerlIO-via/via.xs -@@ -38,6 +38,8 @@ typedef struct - CV *UTF8; - } PerlIOVia; - -+static const MGVTBL PerlIOVia_tag = { 0, 0, 0, 0, 0, 0, 0, 0 }; -+ - #define MYMethod(x) #x,&s->x - - static CV * -@@ -131,8 +133,14 @@ PerlIOVia_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, - PerlIO_funcs * tab) - { - IV code = PerlIOBase_pushed(aTHX_ f, mode, Nullsv, tab); -+ -+ if (SvTYPE(arg) >= SVt_PVMG -+ && mg_findext(arg, PERL_MAGIC_ext, &PerlIOVia_tag)) { -+ return code; -+ } -+ - if (code == 0) { -- PerlIOVia *s = PerlIOSelf(f, PerlIOVia); -+ PerlIOVia *s = PerlIOSelf(f, PerlIOVia); - if (!arg) { - if (ckWARN(WARN_LAYER)) - Perl_warner(aTHX_ packWARN(WARN_LAYER), -@@ -583,20 +591,55 @@ static SV * - PerlIOVia_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags) - { - PerlIOVia *s = PerlIOSelf(f, PerlIOVia); -- PERL_UNUSED_ARG(param); -+ SV *arg; - PERL_UNUSED_ARG(flags); -- return PerlIOVia_method(aTHX_ f, MYMethod(GETARG), G_SCALAR, Nullsv); -+ -+ /* During cloning, return an undef token object so that _pushed() knows -+ * that it should not call methods and wait for _dup() to actually dup the -+ * object. */ -+ if (param) { -+ SV *sv = newSV(0); -+ sv_magicext(sv, NULL, PERL_MAGIC_ext, &PerlIOVia_tag, 0, 0); -+ return sv; -+ } -+ -+ arg = PerlIOVia_method(aTHX_ f, MYMethod(GETARG), G_SCALAR, Nullsv); -+ if (arg) { -+ /* arg is a temp, and PerlIOBase_dup() will explicitly free it */ -+ SvREFCNT_inc(arg); -+ } -+ else { -+ arg = newSVpvn(HvNAME(s->stash), HvNAMELEN(s->stash)); -+ } -+ -+ return arg; - } - - static PerlIO * - PerlIOVia_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param, - int flags) - { -- if ((f = PerlIOBase_dup(aTHX_ f, o, param, flags))) { -- /* Most of the fields will lazily set themselves up as needed -- stash and obj have been set up by the implied push -+ if ((f = PerlIOBase_dup(aTHX_ f, o, param, flags)) && param) { -+ /* For a non-interpreter dup stash and obj have been set up -+ by the implied push. -+ -+ But if this is a clone for a new interpreter we need to -+ translate the objects to their dups. - */ -+ -+ PerlIOVia *fs = PerlIOSelf(f, PerlIOVia); -+ PerlIOVia *os = PerlIOSelf(o, PerlIOVia); -+ -+ fs->obj = sv_dup_inc(os->obj, param); -+ fs->stash = (HV*)sv_dup((SV*)os->stash, param); -+ fs->var = sv_dup_inc(os->var, param); -+ fs->cnt = os->cnt; -+ -+ /* fh, io, cached CVs left as NULL, PerlIOVia_method() -+ will reinitialize them if needed */ - } -+ /* for a non-threaded dup fs->obj and stash should be set by _pushed() */ -+ - return f; - } - --- -2.9.4 - diff --git a/SOURCES/perl-5.27.0-perl-131221-sv_dup-sv_dup_inc-are-only-available-und.patch b/SOURCES/perl-5.27.0-perl-131221-sv_dup-sv_dup_inc-are-only-available-und.patch deleted file mode 100644 index f0e89da..0000000 --- a/SOURCES/perl-5.27.0-perl-131221-sv_dup-sv_dup_inc-are-only-available-und.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 7b3443d31f11c15859593e5b710c301795a6de01 Mon Sep 17 00:00:00 2001 -From: Tony Cook -Date: Thu, 8 Jun 2017 11:06:39 +1000 -Subject: [PATCH] [perl #131221] sv_dup/sv_dup_inc are only available under - threads -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Písař ---- - ext/PerlIO-via/via.xs | 42 +++++++++++++++++++++++------------------- - 1 file changed, 23 insertions(+), 19 deletions(-) - -diff --git a/ext/PerlIO-via/via.xs b/ext/PerlIO-via/via.xs -index 61953c8..d91c685 100644 ---- a/ext/PerlIO-via/via.xs -+++ b/ext/PerlIO-via/via.xs -@@ -619,26 +619,30 @@ static PerlIO * - PerlIOVia_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param, - int flags) - { -- if ((f = PerlIOBase_dup(aTHX_ f, o, param, flags)) && param) { -- /* For a non-interpreter dup stash and obj have been set up -- by the implied push. -- -- But if this is a clone for a new interpreter we need to -- translate the objects to their dups. -- */ -- -- PerlIOVia *fs = PerlIOSelf(f, PerlIOVia); -- PerlIOVia *os = PerlIOSelf(o, PerlIOVia); -- -- fs->obj = sv_dup_inc(os->obj, param); -- fs->stash = (HV*)sv_dup((SV*)os->stash, param); -- fs->var = sv_dup_inc(os->var, param); -- fs->cnt = os->cnt; -- -- /* fh, io, cached CVs left as NULL, PerlIOVia_method() -- will reinitialize them if needed */ -+ if ((f = PerlIOBase_dup(aTHX_ f, o, param, flags))) { -+#ifdef USE_ITHREADS -+ if (param) { -+ /* For a non-interpreter dup stash and obj have been set up -+ by the implied push. -+ -+ But if this is a clone for a new interpreter we need to -+ translate the objects to their dups. -+ */ -+ -+ PerlIOVia *fs = PerlIOSelf(f, PerlIOVia); -+ PerlIOVia *os = PerlIOSelf(o, PerlIOVia); -+ -+ fs->obj = sv_dup_inc(os->obj, param); -+ fs->stash = (HV*)sv_dup((SV*)os->stash, param); -+ fs->var = sv_dup_inc(os->var, param); -+ fs->cnt = os->cnt; -+ -+ /* fh, io, cached CVs left as NULL, PerlIOVia_method() -+ will reinitialize them if needed */ -+ } -+#endif -+ /* for a non-threaded dup fs->obj and stash should be set by _pushed() */ - } -- /* for a non-threaded dup fs->obj and stash should be set by _pushed() */ - - return f; - } --- -2.9.4 - diff --git a/SOURCES/perl-5.27.1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch b/SOURCES/perl-5.27.1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch deleted file mode 100644 index a8398c3..0000000 --- a/SOURCES/perl-5.27.1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 4f08ed80a1ad3deb06ce5d8d20cc2d176dcbced0 Mon Sep 17 00:00:00 2001 -From: Yves Orton -Date: Thu, 29 Jun 2017 11:31:14 +0200 -Subject: [PATCH] Parse caret vars with subscripts the same as normal vars - inside of ${..} escaping -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This behavior is discussed in perl #131664, which complains that -"${^CAPTURE}[0]" does not work as expected. Abigail explains the -behavior is by design and Eirik Berg Hanssen expands on that explanation -pointing out that what /should/ work, "${^CAPTURE[0]}" does not, -which Sawyer then ruled was a bug. - -So this patch makes "${^CAPTURE[0]}" (and "${^CAPTURE [0]}" [hi -abigial]) work the same as they would if the var was called @foo. - -Signed-off-by: Petr Písař ---- - t/base/lex.t | 28 +++++++++++++++++++++++++++- - toke.c | 46 +++++++++++++++++++++++++--------------------- - 2 files changed, 52 insertions(+), 22 deletions(-) - -diff --git a/t/base/lex.t b/t/base/lex.t -index e154aca..89d46df 100644 ---- a/t/base/lex.t -+++ b/t/base/lex.t -@@ -1,6 +1,6 @@ - #!./perl - --print "1..109\n"; -+print "1..116\n"; - - $x = 'x'; - -@@ -154,6 +154,32 @@ my $test = 31; - print "not " unless index ($@, 'Can\'t use global $^XYZ in "my"') > -1; - print "ok $test\n"; $test++; - # print "($@)\n" if $@; -+# -+ ${^TEST}= "splat"; -+ @{^TEST}= ("foo", "bar"); -+ %{^TEST}= ("foo" => "FOO", "bar" => "BAR" ); -+ -+ print "not " if "${^TEST}" ne "splat"; -+ print "ok $test\n"; $test++; -+ -+ print "not " if "${^TEST}[0]" ne "splat[0]"; -+ print "ok $test\n"; $test++; -+ -+ print "not " if "${^TEST[0]}" ne "foo"; -+ print "ok $test\n"; $test++; -+ -+ print "not " if "${ ^TEST [1] }" ne "bar"; -+ print "ok $test\n"; $test++; -+ -+ print "not " if "${^TEST}{foo}" ne "splat{foo}"; -+ print "ok $test\n"; $test++; -+ -+ print "not " if "${^TEST{foo}}" ne "FOO"; -+ print "ok $test\n"; $test++; -+ -+ print "not " if "${ ^TEST {bar} }" ne "BAR"; -+ print "ok $test\n"; $test++; -+ - - # Now let's make sure that caret variables are all forced into the main package. - package Someother; -diff --git a/toke.c b/toke.c -index 0dcf623..ace92e3 100644 ---- a/toke.c -+++ b/toke.c -@@ -9352,19 +9352,36 @@ S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) - bool skip; - char *s2; - /* If we were processing {...} notation then... */ -- if (isIDFIRST_lazy_if_safe(d, e, is_utf8)) { -- /* if it starts as a valid identifier, assume that it is one. -- (the later check for } being at the expected point will trap -- cases where this doesn't pan out.) */ -- d += is_utf8 ? UTF8SKIP(d) : 1; -- parse_ident(&s, &d, e, 1, is_utf8, TRUE); -- *d = '\0'; -+ if (isIDFIRST_lazy_if_safe(d, e, is_utf8) -+ || (!isPRINT(*d) /* isCNTRL(d), plus all non-ASCII */ -+ && isWORDCHAR(*s)) -+ ) { -+ /* note we have to check for a normal identifier first, -+ * as it handles utf8 symbols, and only after that has -+ * been ruled out can we look at the caret words */ -+ if (isIDFIRST_lazy_if_safe(d, e, is_utf8) ) { -+ /* if it starts as a valid identifier, assume that it is one. -+ (the later check for } being at the expected point will trap -+ cases where this doesn't pan out.) */ -+ d += is_utf8 ? UTF8SKIP(d) : 1; -+ parse_ident(&s, &d, e, 1, is_utf8, TRUE); -+ *d = '\0'; -+ } -+ else { /* caret word: ${^Foo} ${^CAPTURE[0]} */ -+ d++; -+ while (isWORDCHAR(*s) && d < e) { -+ *d++ = *s++; -+ } -+ if (d >= e) -+ Perl_croak(aTHX_ "%s", ident_too_long); -+ *d = '\0'; -+ } - tmp_copline = CopLINE(PL_curcop); - if (s < PL_bufend && isSPACE(*s)) { - s = skipspace(s); - } - if ((*s == '[' || (*s == '{' && strNE(dest, "sub")))) { -- /* ${foo[0]} and ${foo{bar}} notation. */ -+ /* ${foo[0]} and ${foo{bar}} and ${^CAPTURE[0]} notation. */ - if (ckWARN(WARN_AMBIGUOUS) && keyword(dest, d - dest, 0)) { - const char * const brack = - (const char *) -@@ -9383,19 +9400,6 @@ S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) - return s; - } - } -- /* Handle extended ${^Foo} variables -- * 1999-02-27 mjd-perl-patch@plover.com */ -- else if (! isPRINT(*d) /* isCNTRL(d), plus all non-ASCII */ -- && isWORDCHAR(*s)) -- { -- d++; -- while (isWORDCHAR(*s) && d < e) { -- *d++ = *s++; -- } -- if (d >= e) -- Perl_croak(aTHX_ "%s", ident_too_long); -- *d = '\0'; -- } - - if ( !tmp_copline ) - tmp_copline = CopLINE(PL_curcop); --- -2.9.4 - diff --git a/SOURCES/perl-5.27.1-add-an-additional-test-for-whitespace-tolerance-in-c.patch b/SOURCES/perl-5.27.1-add-an-additional-test-for-whitespace-tolerance-in-c.patch deleted file mode 100644 index 2df1317..0000000 --- a/SOURCES/perl-5.27.1-add-an-additional-test-for-whitespace-tolerance-in-c.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 9b7d3fdf8458e3581b4fb3a6c557b4db4e1f31e8 Mon Sep 17 00:00:00 2001 -From: Yves Orton -Date: Thu, 29 Jun 2017 13:20:49 +0200 -Subject: [PATCH] add an additional test for whitespace tolerance in caret - word-vars -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Písař ---- - t/base/lex.t | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/t/base/lex.t b/t/base/lex.t -index 89d46df..de33e7a 100644 ---- a/t/base/lex.t -+++ b/t/base/lex.t -@@ -1,6 +1,6 @@ - #!./perl - --print "1..116\n"; -+print "1..117\n"; - - $x = 'x'; - -@@ -158,9 +158,12 @@ my $test = 31; - ${^TEST}= "splat"; - @{^TEST}= ("foo", "bar"); - %{^TEST}= ("foo" => "FOO", "bar" => "BAR" ); -- -+ - print "not " if "${^TEST}" ne "splat"; - print "ok $test\n"; $test++; -+ -+ print "not " if "${ ^TEST }" ne "splat"; -+ print "ok $test\n"; $test++; - - print "not " if "${^TEST}[0]" ne "splat[0]"; - print "ok $test\n"; $test++; --- -2.9.4 - diff --git a/SPECS/perl.spec b/SPECS/perl.spec index 77c5f09..8ddd7cf 100644 --- a/SPECS/perl.spec +++ b/SPECS/perl.spec @@ -1,6 +1,6 @@ %{?scl:%scl_package perl} -%global perl_version 5.26.1 +%global perl_version 5.26.3 %global perl_epoch 4 %global perl_arch_stem -thread-multi %global perl_archname %{_arch}-%{_os}%{perl_arch_stem} @@ -43,8 +43,8 @@ Name: %{?scl_prefix}perl # cpan/Getopt-Long/lib/Getopt/Long.pm: GPLv2+ or Artistic # cpan/Compress-Raw-Zlib/Zlib.xs: (GPL+ or Artistic) and zlib # cpan/Digest-MD5/MD5.xs: (GPL+ or Artistic) and BSD -# cpan/Time-Piece/Piece.xs: (GPL+ or Artisitc) and BSD -# dist/PathTools/Cwd.xs: (GPL+ or Artisitc) and BSD +# cpan/Time-Piece/Piece.xs: (GPL+ or Artistic) and BSD +# dist/PathTools/Cwd.xs: (GPL+ or Artistic) and BSD # cpan/perlfaq/lib/perlfaq4.pod: (GPL+ or Artistic) and Public Domain # cpan/Test-Simple/lib/Test/Tutorial.pod: (GPL+ or Artistic) and # Public Domain @@ -55,7 +55,7 @@ Name: %{?scl_prefix}perl # cpan/Unicode-Collate/Collate/allkeys.txt: Unicode # lib/unicore: UCD # ext/SDBM_File/sdbm.{c,h}: Public domain -# regexec.c, regcomp.c: HSLR +# regexec.c, regcomp.c: HSRL # cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm: MIT (with # exception for Perl) # time64.c: MIT @@ -81,7 +81,7 @@ License: GPL+ or Artistic Epoch: %{perl_epoch} Version: %{perl_version} # release number must be even higher, because dual-lived modules will be broken otherwise -Release: 404%{?dist} +Release: 405%{?dist} Summary: Practical Extraction and Report Language Url: http://www.perl.org/ Source0: http://www.cpan.org/src/5.0/perl-%{perl_version}.tar.bz2 @@ -146,11 +146,6 @@ Patch30: perl-5.22.1-Replace-EU-MM-dependnecy-with-EU-MM-Utils-in-IPC-Cmd # in upstream after 5.27.0 Patch31: perl-5.27.0-perl-131211-fixup-File-Glob-degenerate-matching.patch -# Fix cloning :via handles on thread creation, RT#131221, -# in upstream after 5.27.0 -Patch34: perl-5.27.0-perl-131221-improve-duplication-of-via-handles.patch -Patch35: perl-5.27.0-perl-131221-sv_dup-sv_dup_inc-are-only-available-und.patch - # Fix glob UTF-8 flag on a glob reassignment, RT#131263, # in upstream after 5.27.0 Patch36: perl-5.26.0-perl-131263-clear-the-UTF8-flag-on-a-glob-if-it-isn-.patch @@ -170,8 +165,8 @@ Patch46: perl-5.26.0-t-op-hash.t-fixup-intermittently-failing-test.patch # Parse caret variables with subscripts as normal variables inside ${...} # escaping, RT#131664, in upstream after 5.27.1 -Patch47: perl-5.27.1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch -Patch48: perl-5.27.1-add-an-additional-test-for-whitespace-tolerance-in-c.patch +Patch47: perl-5.26.2-RC1-Parse-caret-vars-with-subscripts-the-same-as-normal-.patch +Patch48: perl-5.26.2-RC1-add-an-additional-test-for-whitespace-tolerance-in-c.patch # Do not display too many bytes when reporting malformed UTF-8 character, # in upstream after 5.27.1 @@ -199,17 +194,6 @@ Patch56: perl-5.27.2-EU-Constant-avoid-uninit-warning.patch # Fix unreliable Time-HiRes tests, CPAN RT#122819, in Time-HiRes-1.9746 Patch58: perl-5.26.0-Time-HiRes-Fix-unreliable-t-usleep.t-and-t-utime.t.patch -# Fix CVE-2018-6798 (heap read overflow in regexec.c), bug #1561100, RT#132063, -# in upstream after 5.26.1 -Patch59: perl-5.26.1-perl-132063-Heap-buffer-overflow.patch -Patch60: perl-5.26.1-fix-TRIE_READ_CHAR-and-DECL_TRIE_TYPE-to-acco.patch -Patch61: perl-5.26.1-perl-132063-we-should-no-longer-warn-for-this-code.patch -Patch62: perl-5.26.1-utf8.c-Don-t-dump-malformation-past-first-NUL.patch - -# Fix CVE-2018-6797 (heap write overflow in regcomp.c), bug #1561100, RT#132227, -# in upstream after 5.26.1 -Patch63: perl-5.26.1-perl-132227-restart-a-node-if-we-change-to-uni-rules.patch - # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -268,7 +252,7 @@ BuildRequires: rsyslog # compat macro needed for rebuild -%global perl_compat %{?scl_prefix}perl(:MODULE_COMPAT_5.26.1) +%global perl_compat %{?scl_prefix}perl(:MODULE_COMPAT_5.26.3) Requires: %perl_compat Requires: %{?scl_prefix}perl-interpreter%{?_isa} = %{perl_epoch}:%{perl_version}-%{release} @@ -416,9 +400,11 @@ Perl utils like "splain" or "perlbug" can be found in perl-utils package. %package libs Summary: The libraries for the perl run-time -License: (GPL+ or Artistic) and HSLR and MIT and UCD +License: (GPL+ or Artistic) and HSRL and MIT and UCD # Compat provides Provides: %perl_compat +Provides: %{?scl_prefix}perl(:MODULE_COMPAT_5.26.2) +Provides: %{?scl_prefix}perl(:MODULE_COMPAT_5.26.1) Provides: %{?scl_prefix}perl(:MODULE_COMPAT_5.26.0) # Interpreter version to fulfil required genersted from "require 5.006;" Provides: %{?scl_prefix}perl(:VERSION) = %{perl_version} @@ -929,7 +915,7 @@ Requires: %perl_compat Conflicts: %{?scl_prefix}perl < 4:5.22.0-351 %description Devel-Peek -Devel::Peek contains functions which allows raw Perl datatypes to be +Devel::Peek contains functions which allows raw Perl data types to be manipulated from a Perl script. This is used by those who do XS programming to check that the data they are sending from C to Perl looks as they think it should look. @@ -2775,8 +2761,6 @@ Perl extension for Version Objects %patch26 -p1 %patch30 -p1 %patch31 -p1 -%patch34 -p1 -%patch35 -p1 %patch36 -p1 %patch38 -p1 %patch43 -p1 @@ -2791,11 +2775,6 @@ Perl extension for Version Objects %patch55 -p1 %patch56 -p1 %patch58 -p1 -%patch59 -p1 -%patch60 -p1 -%patch61 -p1 -%patch62 -p1 -%patch63 -p1 %patch200 -p1 %patch201 -p1 %patch300 -p1 @@ -2823,7 +2802,6 @@ perl -x patchlevel.h \ 'Fedora Patch27: Make PadlistNAMES() lvalue again (CPAN RT#101063)' \ 'Fedora Patch30: Replace EU::MakeMaker dependency with EU::MM::Utils in IPC::Cmd (bug #1129443)' \ 'Fedora Patch31: Make File::Glob more resistant against degenerative matching (RT#131211)' \ - 'Fedora Patch34: Fix cloning :via handles on thread creation (RT#131221)' \ 'Fedora Patch36: Fix glob UTF-8 flag on a glob reassignment (RT#131263)' \ 'Fedora Patch38: Fix handling backslashes in PATH environment variable when executing "perl -S" (RT#129183)' \ 'Fedora Patch45: Fix File::Glob rt131211.t test random failures' \ @@ -2836,8 +2814,6 @@ perl -x patchlevel.h \ 'Fedora Patch55: Fix compiler warnings in code generated by ExtUtils::Constant (CPAN RT#63832)' \ 'Fedora Patch56: Fix compiler warnings in code generated by ExtUtils::Constant (CPAN RT#101487)' \ 'Fedora Patch58: Fix unreliable Time-HiRes tests (CPAN RT#122819)' \ - 'RHEL Patch59: Fix CVE-2018-6798 (heap read overflow in regexec.c) (RT#132063)' \ - 'RHEL Patch63: Fix CVE-2018-6797 (heap write overflow in regcomp.c) (RT#132227)' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -3116,7 +3092,7 @@ sed \ # would run against system perl at build-time. # See __spec_check_pre global macro in macros.perl. #T_FILES=`find %%{buildroot}%%{perl5_testdir} -type f -name '*.t'` -#%%fix_shbang_line $T_FILES +#%%fix_shbang_line $T_FILES #%%{__chmod} +x $T_FILES #%%{_fixperms} %%{buildroot}%%{perl5_testdir} # @@ -5134,6 +5110,13 @@ popd # Old changelog entries are preserved in CVS. %changelog +* Tue Dec 11 2018 Jitka Plesnikova - 4:5.26.3-405 +- 5.26.3 bump (bug #1658969) +- Fix CVE-2018-18311 (integer overflow leading to buffer overflow) +- Fix CVE-2018-18312 (heap buffer overflow in regcomp.c) +- Fix CVE-2018-18313 (heap buffer overflow read in regcomp.c) +- Fix CVE-2018-18314 (heap based buffer overflow) + * Wed Mar 28 2018 Petr Pisar - 4:5.26.1-404 - Fix CVE-2018-6798 (heap read overflow in regexec.c) (bug #1561100) - Fix CVE-2018-6797 (heap write overflow in regcomp.c) (bug #1561100)