From 79b8edddae4fbb7ff3cd8c27c340f5939a7be6ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Mon, 19 Dec 2016 13:14:04 +0100 Subject: Fix regular expression matching
--- ...perl-130307-Correctly-unwind-on-cache-hit.patch | 53 ++++++++++++++++++++++ perl.spec | 6 +++ 2 files changed, 59 insertions(+) create mode 100644 perl-5.22.2-perl-130307-Correctly-unwind-on-cache-hit.patch diff --git a/perl-5.22.2-perl-130307-Correctly-unwind-on-cache-hit.patch b/perl-5.22.2-perl-130307-Correctly-unwind-on-cache-hit.patch new file mode 100644 index 0000000..35bf17a --- /dev/null +++ b/perl-5.22.2-perl-130307-Correctly-unwind-on-cache-hit.patch @@ -0,0 +1,53 @@ +From 5d9b0550a63f6b1e20a69ea9f60d2fffaca0af74 Mon Sep 17 00:00:00 2001 +From: Hugo van der Sanden <h...@crypt.org> +Date: Mon, 12 Dec 2016 15:15:06 +0000 +Subject: [PATCH] Correctly unwind on cache hit +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Petr Pisar: Ported to 5.22.2: + +commit d3c48e81594c1d64ba9833495e45d8951b42027c +Author: Hugo van der Sanden <h...@crypt.org> +Date: Mon Dec 12 15:15:06 2016 +0000 + + [perl #130307] Correctly unwind on cache hit + + We've already incremented curlyx.count in the WHILEM branch before + we check for a hit in the super-linear cache, so must reverse that + on the sayNO. + +Signed-off-by: Petr Písař <ppi...@redhat.com> +--- + regexec.c | 1 + + t/re/re_tests | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/regexec.c b/regexec.c +index 98df35d..ff1d5d8 100644 +--- a/regexec.c ++++ b/regexec.c +@@ -6867,6 +6867,7 @@ NULL + "%*s whilem: (cache) already tried at this position...\n", + REPORT_CODE_OFF+depth*2, "") + ); ++ cur_curlyx->u.curlyx.count--; + sayNO; /* cache records failure */ + } + ST.cache_offset = offset; +diff --git a/t/re/re_tests b/t/re/re_tests +index c65bcce..41fc458 100644 +--- a/t/re/re_tests ++++ b/t/re/re_tests +@@ -1942,6 +1942,7 @@ A+(*PRUNE)BC(?{}) AAABC y $& AAABC + .{1}?+ - c - Nested quantifiers + (?:.||)(?|)000000000@ 000000000@ y $& 000000000@ # [perl #126405] + \b\z0*\x{100} .\x{100} n - - # [perl #129350] crashed in intuit_start ++(X{2,}[-X]{1,4}){3,}X{2,} XXX-XXX-XXX-- n - - # [perl #130307] + + # Keep these lines at the end of the file + # vim: softtabstop=0 noexpandtab +-- +2.7.4 + diff --git a/perl.spec b/perl.spec index bf1b33e..e78e9d8 100644 --- a/perl.spec +++ b/perl.spec @@ -164,6 +164,9 @@ Patch51: perl-5.22.2-assertion-failure-in-.-or-0-x-0.patch # Fix a memory leak in IO::Poll, RT#129788, in upstream after 5.25.7 Patch52: perl-5.22.2-perl-129788-IO-Poll-fix-memory-leak.patch +# Fix regular expression matching, RT#130307, in upstream after 5.25.7 +Patch53: perl-5.22.2-perl-130307-Correctly-unwind-on-cache-hit.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 @@ -2460,6 +2463,7 @@ Perl extension for Version Objects %patch50 -p1 %patch51 -p1 %patch52 -p1 +%patch53 -p1 %patch200 -p1 %patch201 -p1 @@ -2504,6 +2508,7 @@ perl -x patchlevel.h \ 'Fedora Patch50: Fix const correctness in hv_func.h (RT#130169)' \ 'Fedora Patch51: Fix a crash in optimized evaluation of "or ((0) x 0))" (RT#130247)' \ 'Fedora Patch52: Fix a memory leak in IO::Poll (RT#129788)' \ + 'Fedora Patch53: Fix regular expression matching (RT#130307)' \ '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} @@ -4764,6 +4769,7 @@ popd - Fix const correctness in hv_func.h (bug #1242980) - Fix a crash in optimized evaluation of "or ((0) x 0))" (RT#130247) - Fix a memory leak in IO::Poll (RT#129788) +- Fix regular expression matching (RT#130307) * Wed Nov 09 2016 Petr Pisar <ppi...@redhat.com> - 4:5.22.2-364 - Tie perl-Errno release to interpreter build because of kernel version check -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=f24&id=79b8edddae4fbb7ff3cd8c27c340f5939a7be6ba _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org