Compare commits

...

3 Commits

Author SHA1 Message Date
Lukas Javorsky 6c19f36629 Remove unused patches 2023-11-14 03:44:36 +00:00
Lukas Javorsky 65814182f5 Fix an issue with restoring originally unset entries in recursion
Upstream commits:
794245ecc2
457c0e69a8

Resolves: RHEL-16352
2023-11-13 14:04:09 +00:00
Lukas Javorsky d256ba9daf Fix issue in the backtracking optimization of character in JIT
Resolves: RHEL-9938
2023-10-31 08:40:38 +00:00
9 changed files with 203 additions and 408 deletions

2
.pcre2.metadata Normal file
View File

@ -0,0 +1,2 @@
5a433f92b29083d0d8ccd4ec56e3afbe1fa09863 pcre2-10.40.tar.bz2
3f85b8b83621de8649fb623eb3d11434e4c6f989 pcre2-10.40.tar.bz2.sig

View File

@ -1,61 +0,0 @@
From 1ef05f50d623582e8493ab49cfe0c243eed175c9 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Thu, 18 Feb 2021 09:46:08 +0000
Subject: [PATCH] Fix \K within recursion bug in interpreter.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1301 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.36.
---
src/pcre2_match.c | 4 +++-
testdata/testinput1 | 3 +++
testdata/testoutput1 | 4 ++++
diff --git a/src/pcre2_match.c b/src/pcre2_match.c
index e3f78c2..7d9cad0 100644
--- a/src/pcre2_match.c
+++ b/src/pcre2_match.c
@@ -818,10 +818,12 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
/* N is now the frame of the recursion; the previous frame is at the
OP_RECURSE position. Go back there, copying the current subject position
- and mark, and move on past the OP_RECURSE. */
+ and mark, and the start_match position (\K might have changed it), and
+ then move on past the OP_RECURSE. */
P->eptr = Feptr;
P->mark = Fmark;
+ P->start_match = Fstart_match;
F = P;
Fecode += 1 + LINK_SIZE;
continue;
diff --git a/testdata/testinput1 b/testdata/testinput1
index bb4ddb7..4cf1126 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -6429,4 +6429,7 @@ ef) x/x,mark
/a{65536/
>a{65536<
+/a\K.(?0)*/
+ abac
+
# End of testinput1
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index 05b310b..8d4c108 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -10188,4 +10188,8 @@ No match
>a{65536<
0: a{65536
+/a\K.(?0)*/
+ abac
+ 0: c
+
# End of testinput1
--
2.26.2

View File

@ -1,258 +0,0 @@
From ca896b83b391bf6de7a7bf6e76da3bb02eb7001f Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Mon, 1 Feb 2021 17:56:12 +0000
Subject: [PATCH] Fix some numerical checking bugs, Bugzilla 2690.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1295 6239d852-aaf2-0410-a92c-79f79f948069
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/pcre2_compile.c | 52 +++++++++++++++++++++++++++-------------
testdata/testinput1 | 9 +++++++
testdata/testinput11 | 3 +++
testdata/testinput2 | 2 --
testdata/testinput9 | 3 +++
testdata/testoutput1 | 12 ++++++++++
testdata/testoutput11-16 | 4 ++++
testdata/testoutput11-32 | 4 ++++
testdata/testoutput2 | 3 ---
testdata/testoutput9 | 4 ++++
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
index e811f12..4bd5be0 100644
--- a/src/pcre2_compile.c
+++ b/src/pcre2_compile.c
@@ -1398,32 +1398,47 @@ static BOOL
read_repeat_counts(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t *minp,
uint32_t *maxp, int *errorcodeptr)
{
-PCRE2_SPTR p = *ptrptr;
+PCRE2_SPTR p;
BOOL yield = FALSE;
+BOOL had_comma = FALSE;
int32_t min = 0;
int32_t max = REPEAT_UNLIMITED; /* This value is larger than MAX_REPEAT_COUNT */
-/* NB read_number() initializes the error code to zero. The only error is for a
-number that is too big. */
+/* Check the syntax */
+*errorcodeptr = 0;
+for (p = *ptrptr;; p++)
+ {
+ uint32_t c;
+ if (p >= ptrend) return FALSE;
+ c = *p;
+ if (IS_DIGIT(c)) continue;
+ if (c == CHAR_RIGHT_CURLY_BRACKET) break;
+ if (c == CHAR_COMMA)
+ {
+ if (had_comma) return FALSE;
+ had_comma = TRUE;
+ }
+ else return FALSE;
+ }
+
+/* The only error from read_number() is for a number that is too big. */
+
+p = *ptrptr;
if (!read_number(&p, ptrend, -1, MAX_REPEAT_COUNT, ERR5, &min, errorcodeptr))
goto EXIT;
-if (p >= ptrend) goto EXIT;
-
if (*p == CHAR_RIGHT_CURLY_BRACKET)
{
p++;
max = min;
}
-
else
{
- if (*p++ != CHAR_COMMA || p >= ptrend) goto EXIT;
- if (*p != CHAR_RIGHT_CURLY_BRACKET)
+ if (*(++p) != CHAR_RIGHT_CURLY_BRACKET)
{
if (!read_number(&p, ptrend, -1, MAX_REPEAT_COUNT, ERR5, &max,
- errorcodeptr) || p >= ptrend || *p != CHAR_RIGHT_CURLY_BRACKET)
+ errorcodeptr))
goto EXIT;
if (max < min)
{
@@ -1438,11 +1453,10 @@ yield = TRUE;
if (minp != NULL) *minp = (uint32_t)min;
if (maxp != NULL) *maxp = (uint32_t)max;
-/* Update the pattern pointer on success, or after an error, but not when
-the result is "not a repeat quantifier". */
+/* Update the pattern pointer */
EXIT:
-if (yield || *errorcodeptr != 0) *ptrptr = p;
+*ptrptr = p;
return yield;
}
@@ -1776,19 +1790,23 @@ else
{
oldptr = ptr;
ptr--; /* Back to the digit */
- if (!read_number(&ptr, ptrend, -1, INT_MAX/10 - 1, ERR61, &s,
- errorcodeptr))
- break;
- /* \1 to \9 are always back references. \8x and \9x are too; \1x to \7x
+ /* As we know we are at a digit, the only possible error from
+ read_number() is a number that is too large to be a group number. In this
+ case we fall through handle this as not a group reference. If we have
+ read a small enough number, check for a back reference.
+
+ \1 to \9 are always back references. \8x and \9x are too; \1x to \7x
are octal escapes if there are not that many previous captures. */
- if (s < 10 || oldptr[-1] >= CHAR_8 || s <= (int)cb->bracount)
+ if (read_number(&ptr, ptrend, -1, INT_MAX/10 - 1, 0, &s, errorcodeptr) &&
+ (s < 10 || oldptr[-1] >= CHAR_8 || s <= (int)cb->bracount))
{
if (s > (int)MAX_GROUP_NUMBER) *errorcodeptr = ERR61;
else escape = -s; /* Indicates a back reference */
break;
}
+
ptr = oldptr; /* Put the pointer back and fall through */
}
diff --git a/testdata/testinput1 b/testdata/testinput1
index d4e42ba..bb4ddb7 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -6420,4 +6420,13 @@ ef) x/x,mark
/(?(DEFINE)(?<foo>bar))(?<![-a-z0-9])word/
word
+/a{1,2,3}b/
+ a{1,2,3}b
+
+/\214748364/
+ >\x{8c}748364<
+
+/a{65536/
+ >a{65536<
+
# End of testinput1
diff --git a/testdata/testinput11 b/testdata/testinput11
index 2d267d6..2bc8a25 100644
--- a/testdata/testinput11
+++ b/testdata/testinput11
@@ -368,4 +368,7 @@
abÿAz
ab\x{80000041}z
+/(?i:A{1,}\6666666666)/
+ A\x{1b6}6666666
+
# End of testinput11
diff --git a/testdata/testinput2 b/testdata/testinput2
index 3f9dd6d..87e3394 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -2189,8 +2189,6 @@
/a(*MARK)b/
-/(?i:A{1,}\6666666666)/
-
/\g6666666666/
/[\g6666666666]/B
diff --git a/testdata/testinput9 b/testdata/testinput9
index 7be4b15..4eb228a 100644
--- a/testdata/testinput9
+++ b/testdata/testinput9
@@ -260,4 +260,7 @@
/(*:*++++++++++++''''''''''''''''''''+''+++'+++x+++++++++++++++++++++++++++++++++++(++++++++++++++++++++:++++++%++:''''''''''''''''''''''''+++++++++++++++++++++++++++++++++++++++++++++++++++++-++++++++k+++++++''''+++'+++++++++++++++++++++++''''++++++++++++':Æ¿)/
+/(?i:A{1,}\6666666666)/
+ A\x{1b6}6666666
+
# End of testinput9
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index 16c91d2..05b310b 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -10176,4 +10176,16 @@ No match
word
0: word
+/a{1,2,3}b/
+ a{1,2,3}b
+ 0: a{1,2,3}b
+
+/\214748364/
+ >\x{8c}748364<
+ 0: \x8c748364
+
+/a{65536/
+ >a{65536<
+ 0: a{65536
+
# End of testinput1
diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16
index 78bf7fb..8768785 100644
--- a/testdata/testoutput11-16
+++ b/testdata/testoutput11-16
@@ -661,4 +661,8 @@ Subject length lower bound = 1
abÿAz
ab\x{80000041}z
+/(?i:A{1,}\6666666666)/
+ A\x{1b6}6666666
+ 0: A\x{1b6}6666666
+
# End of testinput11
diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32
index 4b00384..2c95f61 100644
--- a/testdata/testoutput11-32
+++ b/testdata/testoutput11-32
@@ -667,4 +667,8 @@ Subject length lower bound = 1
ab\x{80000041}z
0: ab\x{80000041}z
+/(?i:A{1,}\6666666666)/
+ A\x{1b6}6666666
+ 0: A\x{1b6}6666666
+
# End of testinput11
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index dc17011..4d8f65d 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -8374,9 +8374,6 @@ No match
/a(*MARK)b/
Failed: error 166 at offset 7: (*MARK) must have an argument
-/(?i:A{1,}\6666666666)/
-Failed: error 161 at offset 19: subpattern number is too big
-
/\g6666666666/
Failed: error 161 at offset 7: subpattern number is too big
diff --git a/testdata/testoutput9 b/testdata/testoutput9
index f98f276..1ec4317 100644
--- a/testdata/testoutput9
+++ b/testdata/testoutput9
@@ -367,4 +367,8 @@ Failed: error 134 at offset 14: character code point value in \x{} or \o{} is to
/(*:*++++++++++++''''''''''''''''''''+''+++'+++x+++++++++++++++++++++++++++++++++++(++++++++++++++++++++:++++++%++:''''''''''''''''''''''''+++++++++++++++++++++++++++++++++++++++++++++++++++++-++++++++k+++++++''''+++'+++++++++++++++++++++++''''++++++++++++':Æ¿)/
Failed: error 176 at offset 259: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
+/(?i:A{1,}\6666666666)/
+Failed: error 151 at offset 13: octal value is greater than \377 in 8-bit non-UTF-8 mode
+ A\x{1b6}6666666
+
# End of testinput9
--
2.26.2

View File

@ -1,59 +0,0 @@
From 32e83fc2d59413d13039cc31db1558d9c0e3b874 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Thu, 14 Jan 2021 16:56:44 +0000
Subject: [PATCH] Get rid of gcc -fanalyzer error (though it was probably a
false positive).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1293 6239d852-aaf2-0410-a92c-79f79f948069
Signed-off-by: Petr Písař <ppisar@redhat.com>
Petr Pisar: Ported to 10.36.
---
src/pcre2_auto_possess.c | 13 +++++++++----
diff --git a/src/pcre2_auto_possess.c b/src/pcre2_auto_possess.c
index c64cf85..66064ed 100644
--- a/src/pcre2_auto_possess.c
+++ b/src/pcre2_auto_possess.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2020 University of Cambridge
+ New API code Copyright (c) 2016-2021 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -490,6 +490,7 @@ switch(c)
list[2] = (uint32_t)(end - code);
return end;
}
+
return NULL; /* Opcode not accepted */
}
@@ -1186,12 +1187,16 @@ for (;;)
c = *repeat_opcode;
if (c >= OP_CRSTAR && c <= OP_CRMINRANGE)
{
- /* end must not be NULL. */
+ /* The return from get_chr_property_list() will never be NULL when
+ *code (aka c) is one of the three class opcodes. However, gcc with
+ -fanalyzer notes that a NULL return is possible, and grumbles. Hence we
+ put in a check. */
+
end = get_chr_property_list(code, utf, ucp, cb->fcc, list);
-
list[1] = (c & 1) == 0;
- if (compare_opcodes(end, utf, ucp, cb, list, end, &rec_limit))
+ if (end != NULL &&
+ compare_opcodes(end, utf, ucp, cb, list, end, &rec_limit))
{
switch (c)
{
--
2.26.2

View File

@ -1,29 +0,0 @@
From 29dd457d21ec0350bd9d55f33c0e53ca285d52c2 Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Fri, 19 Feb 2021 09:20:37 +0000
Subject: [PATCH] Restore single character repetition optimization in JIT.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1302 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.36.
---
src/pcre2_jit_compile.c | 2 +-
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index 1977d28..3281464 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -1226,7 +1226,7 @@ while (cc < ccend)
return TRUE;
}
-#define EARLY_FAIL_ENHANCE_MAX (1 + 1)
+#define EARLY_FAIL_ENHANCE_MAX (1 + 3)
/*
start:
--
2.26.2

View File

@ -0,0 +1,60 @@
From 44a4e60e0ad45d4c60b7da10e9e9531da75bb9a4 Mon Sep 17 00:00:00 2001
From: Zoltan Herczeg <hzmester@freemail.hu>
Date: Tue, 12 Jul 2022 08:35:38 +0000
Subject: [PATCH] Fixed an issue in the backtracking optimization of character
repeats in JIT
---
src/pcre2_jit_compile.c | 20 ++++++++++----------
src/pcre2_jit_test.c | 1 +
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index e638c24..b3cffbe 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -11517,19 +11517,19 @@ if (exact > 1)
}
}
else if (exact == 1)
- {
compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, TRUE);
- if (early_fail_type == type_fail_range)
- {
- OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), early_fail_ptr);
- OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), early_fail_ptr + (int)sizeof(sljit_sw));
- OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, TMP2, 0);
- OP2(SLJIT_SUB, TMP2, 0, STR_PTR, 0, TMP2, 0);
- add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_LESS_EQUAL, TMP2, 0, TMP1, 0));
+if (early_fail_type == type_fail_range)
+ {
+ /* Range end first, followed by range start. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), early_fail_ptr);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), early_fail_ptr + (int)sizeof(sljit_sw));
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, TMP2, 0);
+ OP2(SLJIT_SUB, TMP2, 0, STR_PTR, 0, TMP2, 0);
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_LESS_EQUAL, TMP2, 0, TMP1, 0));
- OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), early_fail_ptr + (int)sizeof(sljit_sw), STR_PTR, 0);
- }
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), early_fail_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), early_fail_ptr + (int)sizeof(sljit_sw), STR_PTR, 0);
}
switch(opcode)
diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c
index bb141a0..81c9582 100644
--- a/src/pcre2_jit_test.c
+++ b/src/pcre2_jit_test.c
@@ -354,6 +354,7 @@ static struct regression_test_case regression_test_cases[] = {
{ MU, A, 0, 0, "_[ab]+_*a", "_aa" },
{ MU, A, 0, 0, "#(A+)#\\d+", "#A#A#0" },
{ MU, A, 0, 0, "(?P<size>\\d+)m|M", "4M" },
+ { M, PCRE2_NEWLINE_CRLF, 0, 0, "\\n?.+#", "\n,\n,#" },
/* Bracket repeats with limit. */
{ MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" },
--
2.41.0

View File

@ -0,0 +1,65 @@
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

@ -0,0 +1,61 @@
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

View File

@ -9,7 +9,7 @@
#%%global rcversion RC1
Name: pcre2
Version: 10.40
Release: %{?rcversion:0.}2%{?rcversion:.%rcversion}%{?dist}
Release: %{?rcversion:0.}4%{?rcversion:.%rcversion}%{?dist}
%global myversion %{version}%{?rcversion:-%rcversion}
Summary: Perl-compatible regular expression library
# the library: BSD with exceptions
@ -51,6 +51,13 @@ Source1: https://ftp.pcre.org/pub/pcre/%{?rcversion:Testing/}%{name}-%{myvers
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 patch: https://github.com/PCRE2Project/pcre2/commit/4851890ede31313655e19180f4959ed348fee580
Patch1: pcre2-10.40-Fix-JIT-regression-in-PHP.patch
# Upstream commits:
# https://github.com/PCRE2Project/pcre2/commit/794245ecc296724b52f5030831e58bedbffa2452
# https://github.com/PCRE2Project/pcre2/commit/457c0e69a8f78d32bc7d4b6422cd01e396a4cf5d
Patch2: pcre2-10.42-Match-also-restore-originally-unset-entries-in-recur.patch
Patch3: pcre2-10.42-Add-more-examples-fixed-by-300.patch
BuildRequires: autoconf
BuildRequires: automake
@ -258,6 +265,13 @@ make %{?_smp_mflags} check VERBOSE=yes
%{_mandir}/man1/pcre2test.*
%changelog
* Mon Nov 13 2023 Lukas Javorsky <ljavorsk@redhat.com> - 10.40-4
- Fix an issue with restoring originally unset entries in recursion
- Resolves: BZ#2248133
* Tue Oct 17 2023 Lukas Javorsky <ljavorsk@redhat.com> - 10.40-3
- Fix issue in the backtracking optimization of character in JIT
* Wed May 18 2022 Lukas Javorsky <ljavorsk@redhat.com> - 10.40-2
- Explicitly require uft subpackages in tools subpackage