Rebase to version 10.44

Resolves: RHEL-45170
This commit is contained in:
Lukas Javorsky 2024-07-19 09:49:38 +00:00
parent ee5dee9182
commit 2b62ff6362
6 changed files with 5238 additions and 135 deletions

2
.gitignore vendored
View File

@ -40,3 +40,5 @@
/pcre2-10.40.tar.bz2.sig
/pcre2-10.42.tar.bz2
/pcre2-10.42.tar.bz2.sig
/pcre2-10.44.tar.bz2
/pcre2-10.44.tar.bz2.sig

View File

@ -1,65 +0,0 @@
From 457c0e69a8f78d32bc7d4b6422cd01e396a4cf5d Mon Sep 17 00:00:00 2001
From: Philip Hazel <Philip.Hazel@gmail.com>
Date: Tue, 3 Oct 2023 16:52:56 +0100
Subject: [PATCH] Add more examples fixed by #300; update ChangeLog
---
testdata/testinput1 | 8 ++++++++
testdata/testoutput1 | 22 ++++++++++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/testdata/testinput1 b/testdata/testinput1
index 3d75a35..533389d 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -4374,6 +4374,14 @@
/(?<all>(?:(?:a(?&all))|(b))(c?))/
aabc
+
+/(a(b)|(c))(?1)/
+ abc
+ cab
+
+/(?1)(a(b)|(c))/
+ abc
+ cab
/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
(?(DEFINE)
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index 26d3c83..bedd924 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -6954,6 +6954,28 @@ No match
1: aabc
2: <unset>
3:
+
+/(a(b)|(c))(?1)/
+ abc
+ 0: abc
+ 1: ab
+ 2: b
+ cab
+ 0: cab
+ 1: c
+ 2: <unset>
+ 3: c
+
+/(?1)(a(b)|(c))/
+ abc
+ 0: abc
+ 1: c
+ 2: <unset>
+ 3: c
+ cab
+ 0: cab
+ 1: ab
+ 2: b
/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
(?(DEFINE)
--
2.41.0

View File

@ -1,61 +0,0 @@
From 794245ecc296724b52f5030831e58bedbffa2452 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= <carenas@gmail.com>
Date: Tue, 3 Oct 2023 08:14:23 -0700
Subject: [PATCH] match: also restore originally unset entries in recursion
(#300)
A regresion from ~10.30 not affecting JIT
---
src/pcre2_match.c | 2 +-
testdata/testinput1 | 3 +++
testdata/testoutput1 | 7 +++++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/pcre2_match.c b/src/pcre2_match.c
index 5ce1792..8b57c75 100644
--- a/src/pcre2_match.c
+++ b/src/pcre2_match.c
@@ -5953,7 +5953,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
{
P = (heapframe *)((char *)N - frame_size);
memcpy((char *)F + offsetof(heapframe, ovector), P->ovector,
- P->offset_top * sizeof(PCRE2_SIZE));
+ Foffset_top * sizeof(PCRE2_SIZE));
Foffset_top = P->offset_top;
Fcapture_last = P->capture_last;
Fcurrent_recurse = P->current_recurse;
diff --git a/testdata/testinput1 b/testdata/testinput1
index 062dfe0..3d75a35 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -4372,6 +4372,9 @@
/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
abcd
+/(?<all>(?:(?:a(?&all))|(b))(c?))/
+ aabc
+
/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
(?(DEFINE)
(?<NAME_PAT>[a-z]+)
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index 1dc3b2f..26d3c83 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -6948,6 +6948,13 @@ No match
abcd
0: ab
+/(?<all>(?:(?:a(?&all))|(b))(c?))/
+ aabc
+ 0: aabc
+ 1: aabc
+ 2: <unset>
+ 3:
+
/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
(?(DEFINE)
(?<NAME_PAT>[a-z]+)
--
2.41.0

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,8 @@
# This is stable release:
#%%global rcversion RC1
Name: pcre2
Version: 10.42
Release: %{?rcversion:0.}3%{?rcversion:.%rcversion}%{?dist}.3
Version: 10.44
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
%global myversion %{version}%{?rcversion:-%rcversion}
Summary: Perl-compatible regular expression library
# the library: BSD with exceptions
@ -51,11 +51,9 @@ Source1: https://github.com/PCRE2Project/pcre2/releases/download/pcre2-%{vers
Source2: https://ftp.pcre.org/pub/pcre/Public-Key
# Do no set RPATH if libdir is not /usr/lib
Patch0: pcre2-10.10-Fix-multilib.patch
# Upstream commits:
# https://github.com/PCRE2Project/pcre2/commit/794245ecc296724b52f5030831e58bedbffa2452
# https://github.com/PCRE2Project/pcre2/commit/457c0e69a8f78d32bc7d4b6422cd01e396a4cf5d
Patch1: pcre2-10.42-Match-also-restore-originally-unset-entries-in-recur.patch
Patch2: pcre2-10.42-Add-more-examples-fixed-by-300.patch
# Upstream commit: https://github.com/PCRE2Project/pcre2/commit/57906628d7babd27c01eb1c085d3e0cdd512189a
# Fixes the failing tests on 32-bit arch (i686)
Patch1: pcre2-10.44-pcre2test-memory-reports-only-compiled-memory-usage.patch
BuildRequires: autoconf
BuildRequires: automake
@ -262,6 +260,9 @@ make %{?_smp_mflags} check VERBOSE=yes
%{_mandir}/man1/pcre2test.*
%changelog
* Fri Jul 19 2024 Lukas Javorsky <ljavorsk@redhat.com> - 10.44-1
- Rebase to version 10.44
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 10.42-3.3
- Bump release for June 2024 mass rebuild

View File

@ -1,2 +1,2 @@
SHA512 (pcre2-10.42.tar.bz2) = 72fbde87fecec3aa4b47225dd919ea1d55e97f2cbcf02aba26e5a0d3b1ffb58c25a80a9ef069eb99f9cf4e41ba9604ad06a7ec159870e1e875d86820e12256d3
SHA512 (pcre2-10.42.tar.bz2.sig) = 22ce3c7903835b1cf835ac6cfa725badecc982f1504382e62525c88307b2e3bd8951f2221fdd3d73920843e69f714b6df99fe741069e610f1f809087512a31f7
SHA512 (pcre2-10.44.tar.bz2) = ee91cc10a2962bc7818b03d368df3dd31f42ea9a7260ae51483ea8cd331b7431e36e63256b0adc213cc6d6741e7c90414fd420622308c0ae3fcb5dd878591be2
SHA512 (pcre2-10.44.tar.bz2.sig) = 12dca6fb6ac3dbbe9e3625214b333d20d4ece4c2efa73ada292b178b17ea3640b4f068f2b4da2bea15f5368213e123837dea4e988170d1c6bf5b7afe04b3f8bc