RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/pcre2#aefe0df10c5ed528a7034affaf69227df0058a69
This commit is contained in:
Petr Šabata 2020-10-15 23:03:45 +02:00
parent dccd0283e3
commit f31a0efef2
15 changed files with 2154 additions and 0 deletions

28
.gitignore vendored
View File

@ -0,0 +1,28 @@
/pcre2-10.10.tar.bz2
/pcre2-10.20-RC1.tar.bz2
/pcre2-10.20.tar.bz2
/pcre2-10.21-RC1.tar.bz2
/pcre2-10.21.tar.bz2
/pcre2-10.22-RC1.tar.bz2
/pcre2-10.22.tar.bz2
/pcre2-10.23-RC1.tar.bz2
/pcre2-10.23.tar.bz2
/pcre2-10.30-RC1.tar.bz2
/pcre2-10.30.tar.bz2
/pcre2-10.31-RC1.tar.bz2
/pcre2-10.31.tar.bz2
/pcre2-10.32-RC1.tar.bz2
/pcre2-10.32.tar.bz2
/pcre2-10.33-RC1.tar.bz2
/pcre2-10.33.tar.bz2
/pcre2-10.33.tar.bz2.sig
/pcre2-10.34-RC1.tar.bz2
/pcre2-10.34-RC1.tar.bz2.sig
/pcre2-10.34-RC2.tar.bz2
/pcre2-10.34-RC2.tar.bz2.sig
/pcre2-10.34.tar.bz2
/pcre2-10.34.tar.bz2.sig
/pcre2-10.35-RC1.tar.bz2
/pcre2-10.35-RC1.tar.bz2.sig
/pcre2-10.35.tar.bz2
/pcre2-10.35.tar.bz2.sig

39
Public-Key Normal file
View File

@ -0,0 +1,39 @@
This is Philip Hazel's public GPG key.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.0 (SunOS)
mQEMBD2z9g0BCACpGWJ4K2mjR6K9nv7/K+HLjJtDO0E0ckudeNjg2JvnuUU7m1bK
87nSklHTSMNiqmuVU5hFAuGiMGBMj31GPpce3VbABdm6TmAJB8ZndvJXyf8lC7Ko
5iZX/gCYU6817UI5pFwYR3MTIUSSxTGqk1y62pYLKUq9keSU5Cew4q1KMwl46Bn3
SwlfQeST4WGwL2w9b8mWNltBBY23bgzwYu7vFBD4GQnfzJsvMC9lj825wob2nKy5
CL4bY6tiYUqALzDYaIVCBqJ1Ky1rpPzRcDZUeeF8Ta3njh18Y0KzPEj+Xu5Ksexg
7LUy/2wFzVRtJgqvAFZo43KIOptsj/63zxJjAAkBAbQhUGhpbGlwIEhhemVsIDxw
aDEwQGN1cy5jYW0uYWMudWs+iQEyBBMBAgAcBQI9s/YNAhsDBAsHAwIDFQIDAxYC
AQIeAQIXgAAKCRCXZuCE+w9D2JbrCACBHrxybV+9t3TGR3+uk2QnUuct90a+udcB
cbWgKQgX345ZgwIfyoPKAbG84mN/+SFUN/Ie4ZHZxVsbN//l2P/Osx0CNQBfem4e
HUWegkFGzC5DxQhN5nsJ/GR6pnxG1l/DbNhupNY73oTajWFdi7K8jYfamU/zS/Da
VCwUKxWtGqyEqOxvbdqcjsnTMmLVfXtefx7CbKyhaClPP8Pe4FL+eqyfHJF7uywK
VWlUNmQa4E+ZAK8tkoK9sZAc0ImWwZMumiKZDEpr2D8Ty+Gg2umTS2OMIcbY8QF1
r6DeubFabdPIe1kn0BGXtdAurhbdJCIbcAEQS0eEeWC4A4LiDprntB1QaGlsaXAg
SGF6ZWwgPHBoMTBAY2FtLmFjLnVrPokBMgQTAQIAHAUCPbaC8QIbAwQLBwMCAxUC
AwMWAgECHgECF4AACgkQl2bghPsPQ9ho5Qf+I2HUhZeXOUneeqSa+cITsIELJMrZ
UWcydY1z+L68yOqURVHB1jF4aC6QSlq0pLjozwF6KfZO5AfN9FvkRQ0DzCEXH48W
OXqzbjzgNxRMdaP5+49Axl0UQuhupGJg66T4FiGnSVBhK8kTURPCSpLLgkCJqNcY
t5zuNwk3e7JvleT59EVpk/kw3a5p9oeKYBln57pHwq+HdPLSCdkedQBKdsbNrazy
qduYEXen4ogsIoTpA9lLH1Xsi9wL+soLAlWXtl/GNa1h7Jpwn41zp1hqIZe1ebIM
dSGbtMEaGJlqgDauYJSl0lkVgaPtZCTmfAf57TsGfD0IckN2XNGLuwb6DLkBCwQ9
s/eJAQgAuXq2I1VTDB108O0NAB6QKfA2gMHafoj3OcwEUHnJgXrHqjYOpFr0r5lC
YjwMRMvHO7r4jgtwKjGACI/1IE2hiGXkKFOWZFkCf7Qjoi13a78myC/VRwe4uEIs
xdz++w8WfzuC1sYw8d/rlybVzHTfTsKfmFOQamuyLCTm3Kdx/wZyGM7JMmgVn2zF
HWasdID0n7QJFZGR3yEfqis5zq1t3w28AaXlTZG7QtFj9V0cWIhZRjjjVe1biPA8
Btp+eFkmcat79N9hHbiEiAY3u2qmQCcn1fiBBC0Og09cY4dRyX0/bXUo4n8lHysp
JcL/sIZ7Ahd1LOfg9h+yQfoaey78LQAGKYkBHwQYAQIACQUCPbP3iQIbDAAKCRCX
ZuCE+w9D2P0BCACXsbwFerd4wlnt8PxxQlRGXi1t4EGBFf2zSdgQvIXJ3ntPzcDU
+8hnIWQJhCTZ3PfVmoqB6ZOM1RWI/IcP6b4qVb6vJGI/VxRICraAczw+4bdFxFiB
n2+SyD4MxZg8t66FcH3fHugQqsApHTmtKmahv5BXB+0dPmP/BRUmzxYUv8hdnhHl
91S4R4BDu84DvKYyJK9jlqUl06pvqXrBSNsbWKgAJnmnDe8FaLUk+p0IXeMSavUn
T5E26MRIioxAz/G4FZI8IdO92GHTz82O7/mQMhveAdpspDvpV3M4wnldU425GlxZ
nmq1bbjAU4QVuIS9nkk2GrGx5+N6cYMy8JqG
=EHsz
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -0,0 +1,39 @@
From 8b6b10229201e5b148979a24e06c640dbbcfbad9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 20 Feb 2015 14:34:26 +0100
Subject: [PATCH] Fix multilib
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Do not set RPATH nor add explicit -L path to compiler.
Signed-off-by: Petr Písař <ppisar@redhat.com>
diff --git a/pcre2-config.in b/pcre2-config.in
index 932160e..dbef5e5 100644
--- a/pcre2-config.in
+++ b/pcre2-config.in
@@ -28,19 +28,7 @@ if test $# -eq 0; then
fi
libR=
-case `uname -s` in
- *SunOS*)
- libR=" -R@libdir@"
- ;;
- *BSD*)
- libR=" -Wl,-R@libdir@"
- ;;
-esac
-
libS=
-if test @libdir@ != /usr/lib ; then
- libS=-L@libdir@
-fi
while test $# -gt 0; do
case "$1" in
--
2.1.0

View File

@ -0,0 +1,95 @@
From 4f0b3ea9771e49fb0d5e5c323e7966ceff2c7ec2 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Mon, 25 May 2020 16:03:24 +0000
Subject: [PATCH 1/2] Apply H.J. Lu's patch to pass -mshstk to the compiler
when Intel CET is enabled. CMake version invented by PH, but only tested on
non-CET system.
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@1256 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.35.
---
CMakeLists.txt | 19 +++++++++++++++++++
Makefile.am | 1 +
configure.ac | 15 +++++++++++++++
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86b8896..5e8a763 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,6 +92,7 @@
# library versioning.
# 2020-04-25 Carlo added function check for mkostemp used in ProtExecAllocator
# 2020-04-28 PH added function check for memfd_create based on Carlo's patch
+# 2020-05-25 PH added a check for Intel CET
PROJECT(PCRE2 C)
@@ -146,6 +147,24 @@ CHECK_C_SOURCE_COMPILES(
)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
+# Check whether Intel CET is enabled, and if so, adjust compiler flags. This
+# code was written by PH, trying to imitate the logic from the autotools
+# configuration.
+
+CHECK_C_SOURCE_COMPILES(
+ "#ifndef __CET__
+ #error CET is not enabled
+ #endif
+ int main() { return 0; }"
+ INTEL_CET_ENABLED
+)
+
+IF (INTEL_CET_ENABLED)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk")
+ENDIF(INTEL_CET_ENABLED)
+
+
+
# User-configurable options
#
# Note: CMakeSetup displays these in alphabetical order, regardless of
diff --git a/Makefile.am b/Makefile.am
index bb888f2..af6b92b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -391,6 +391,7 @@ nodist_libpcre2_8_la_SOURCES = \
libpcre2_8_la_CFLAGS = \
-DPCRE2_CODE_UNIT_WIDTH=8 \
$(VISIBILITY_CFLAGS) \
+ $(CET_CFLAGS) \
$(AM_CFLAGS)
libpcre2_8_la_LIBADD =
endif # WITH_PCRE2_8
diff --git a/configure.ac b/configure.ac
index 180d3dc..61b93ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1006,6 +1006,21 @@ fi # enable_coverage
AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"])
+AC_MSG_CHECKING([whether Intel CET is enabled])
+AC_LANG_PUSH([C])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
+ [[#ifndef __CET__
+# error CET is not enabled
+#endif]])],
+ [pcre2_cc_cv_intel_cet_enabled=yes],
+ [pcre2_cc_cv_intel_cet_enabled=no])
+AC_MSG_RESULT([$pcre2_cc_cv_intel_cet_enabled])
+if test "$pcre2_cc_cv_intel_cet_enabled" = yes; then
+ CET_CFLAGS="-mshstk"
+ AC_SUBST([CET_CFLAGS])
+fi
+AC_LANG_POP([C])
+
# Produce these files, in addition to config.h.
AC_CONFIG_FILES(
Makefile
--
2.25.4

View File

@ -0,0 +1,79 @@
From c23be766617cbfcb14e56dc5f1f01289077bd125 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Tue, 15 Sep 2020 14:36:23 +0000
Subject: [PATCH] Fix Bugzilla #2642: no match bug in 8-bit mode for caseless
invalid utf matching.
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@1272 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.35.
---
src/pcre2_match.c | 10 ++++++++--
testdata/testinput10 | 3 +++
testdata/testoutput10 | 4 ++++
diff --git a/src/pcre2_match.c b/src/pcre2_match.c
index 11289d5..3372410 100644
--- a/src/pcre2_match.c
+++ b/src/pcre2_match.c
@@ -6115,8 +6115,8 @@ BOOL has_req_cu = FALSE;
BOOL startline;
#if PCRE2_CODE_UNIT_WIDTH == 8
-BOOL memchr_not_found_first_cu = FALSE;
-BOOL memchr_not_found_first_cu2 = FALSE;
+BOOL memchr_not_found_first_cu;
+BOOL memchr_not_found_first_cu2;
#endif
PCRE2_UCHAR first_cu = 0;
@@ -6709,6 +6709,11 @@ FRAGMENT_RESTART:
start_partial = match_partial = NULL;
mb->hitend = FALSE;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+memchr_not_found_first_cu = FALSE;
+memchr_not_found_first_cu2 = FALSE;
+#endif
+
for(;;)
{
PCRE2_SPTR new_start_match;
@@ -7187,6 +7192,7 @@ if (utf && end_subject != true_end_subject &&
starting code units in 8-bit and 16-bit modes. */
start_match = end_subject + 1;
+
#if PCRE2_CODE_UNIT_WIDTH != 32
while (start_match < true_end_subject && NOT_FIRSTCU(*start_match))
start_match++;
diff --git a/testdata/testinput10 b/testdata/testinput10
index b3c3197..efd3298 100644
--- a/testdata/testinput10
+++ b/testdata/testinput10
@@ -610,4 +610,7 @@
/X(\x{e1})Y/replace=>\U$1<,substitute_extended
X\x{e1}Y
+/A/utf,match_invalid_utf,caseless
+ \xe5A
+
# End of testinput10
diff --git a/testdata/testoutput10 b/testdata/testoutput10
index 59af535..2a3803f 100644
--- a/testdata/testoutput10
+++ b/testdata/testoutput10
@@ -1871,4 +1871,8 @@ Subject length lower bound = 1
X\x{e1}Y
1: >\xe1<
+/A/utf,match_invalid_utf,caseless
+ \xe5A
+ 0: A
+
# End of testinput10
--
2.25.4

View File

@ -0,0 +1,114 @@
From 938cca6343300495c67461c08f4732f098a7ce30 Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Wed, 15 Jul 2020 04:35:32 +0000
Subject: [PATCH] Fix an early fail optimization issue and a buffer overread 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@1267 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.35.
---
src/pcre2_jit_compile.c | 24 ++++++++++++------------
src/pcre2_jit_test.c | 1 +
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index 7c5d63b..2bd4275 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -1466,9 +1466,9 @@ do
default:
accelerated_start = NULL;
fast_forward_allowed = FALSE;
- break;
+ continue;
}
- continue;
+ break;
case OP_ONCE:
case OP_BRA:
@@ -1834,57 +1834,57 @@ while (cc < ccend)
case OP_BRAZERO:
case OP_BRAMINZERO:
case OP_BRAPOSZERO:
- repeat_check = FALSE;
size = 1;
+ repeat_check = FALSE;
break;
CASE_ITERATOR_PRIVATE_DATA_1
- space = 1;
size = -2;
+ space = 1;
break;
CASE_ITERATOR_PRIVATE_DATA_2A
- space = 2;
size = -2;
+ space = 2;
break;
CASE_ITERATOR_PRIVATE_DATA_2B
- space = 2;
size = -(2 + IMM2_SIZE);
+ space = 2;
break;
CASE_ITERATOR_TYPE_PRIVATE_DATA_1
- space = 1;
size = 1;
+ space = 1;
break;
CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+ size = 1;
if (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI)
space = 2;
- size = 1;
break;
case OP_TYPEUPTO:
+ size = 1 + IMM2_SIZE;
if (cc[1 + IMM2_SIZE] != OP_ANYNL && cc[1 + IMM2_SIZE] != OP_EXTUNI)
space = 2;
- size = 1 + IMM2_SIZE;
break;
case OP_TYPEMINUPTO:
- space = 2;
size = 1 + IMM2_SIZE;
+ space = 2;
break;
case OP_CLASS:
case OP_NCLASS:
- space = get_class_iterator_size(cc + size);
size = 1 + 32 / sizeof(PCRE2_UCHAR);
+ space = get_class_iterator_size(cc + size);
break;
#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
case OP_XCLASS:
- space = get_class_iterator_size(cc + size);
size = GET(cc, 1);
+ space = get_class_iterator_size(cc + size);
break;
#endif
diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c
index 16dade7..b7856ad 100644
--- a/src/pcre2_jit_test.c
+++ b/src/pcre2_jit_test.c
@@ -350,6 +350,7 @@ static struct regression_test_case regression_test_cases[] = {
{ MU, A, 0, 0, ".[ab]*.", "xx" },
{ MU, A, 0, 0, ".[ab]*a", "xxa" },
{ MU, A, 0, 0, ".[ab]?.", "xx" },
+ { MU, A, 0, 0, "_[ab]+_*a", "_aa" },
/* Bracket repeats with limit. */
{ MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" },
--
2.25.4

View File

@ -0,0 +1,412 @@
From 0edcbc5e42409ea801908af0917ae11eb70a1435 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Sun, 13 Sep 2020 15:56:32 +0000
Subject: [PATCH] Fix delimiters in tests 1 and 4 for correct Perl behaviour
(Bugzilla #2641). Also move \K in lookaround tests to test 2 (Perl no longer
supports).
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@1269 6239d852-aaf2-0410-a92c-79f79f948069
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
perltest.sh | 3 +++
testdata/testinput1 | 43 +++++++++++++++++----------------------
testdata/testinput2 | 16 +++++++++++++++
testdata/testinput4 | 8 ++++++--
testdata/testoutput1 | 48 ++++++++++++++++++--------------------------
testdata/testoutput2 | 20 ++++++++++++++++++
testdata/testoutput4 | 8 ++++++--
diff --git a/perltest.sh b/perltest.sh
index 8368781..31406c5 100755
--- a/perltest.sh
+++ b/perltest.sh
@@ -68,6 +68,9 @@ fi
# #newline_default commands, which are needed in the relevant pcre2test files,
# are ignored. Any other #-command is ignored, with a warning message.
#
+# The pattern lines should use only / as the delimiter. The other characters
+# that pcre2test supports cause problems with this script.
+#
# The data lines must not have any pcre2test modifiers. Unless
# "subject_literal" is on the pattern, data lines are processed as
# Perl double-quoted strings, so if they contain " $ or @ characters, these
diff --git a/testdata/testinput1 b/testdata/testinput1
index 8d952e2..8a50cfa 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -1,6 +1,10 @@
# This set of tests is for features that are compatible with all versions of
# Perl >= 5.10, in non-UTF mode. It should run clean for the 8-bit, 16-bit, and
# 32-bit PCRE libraries, and also using the perltest.sh script.
+
+# WARNING: Use only / as the pattern delimiter. Although pcre2test supports
+# a number of delimiters, all those other than / give problems with the
+# perltest.sh script.
#forbid_utf
#newline_default lf any anycrlf
@@ -1957,7 +1961,7 @@
abc\nzzz
qqq\nabc\nzzz
-"(?>.*/)foo"
+/(?>.*\/)foo/
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
\= Expect no match
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
@@ -3831,12 +3835,13 @@
/(?-x: )/x
A\x20B
-"(?x)(?-x: \s*#\s*)"
+/(?x)(?-x: \s*#\s*)/
A # B
\= Expect no match
#
+ A s#s B
-"(?x-is)(?:(?-ixs) \s*#\s*) include"
+/(?x-is)(?:(?-ixs) \s*#\s*) include/
A #include
\= Expect no match
A#include
@@ -5232,11 +5237,11 @@ name)/mark
alphabetabcd
endingwxyz
-"(?>.*)foo"
+/(?>.*)foo/
\= Expect no match
abcdfooxyz
-"(?>.*?)foo"
+/(?>.*?)foo/
abcdfooxyz
/(?:(a(*PRUNE)b)){0}(?:(?1)|ac)/
@@ -5423,18 +5428,6 @@ name)/mark
\= Expect no match
a
-/(?=a\Kb)ab/
- ab
-
-/(?!a\Kb)ac/
- ac
-
-/^abc(?<=b\Kc)d/
- abcd
-
-/^abc(?<!b\Kq)d/
- abcd
-
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/x,mark
\= Expect no match
AAAC
@@ -5727,9 +5720,9 @@ name)/mark
/(\2)(\1)/
-"Z*(|d*){216}"
+/Z*(|d*){216}/
-"(?1)(?#?'){8}(a)"
+/(?1)(?#?'){8}(a)/
baaaaaaaaac
/((((((((((((x))))))))))))\12/
@@ -5741,7 +5734,7 @@ name)/mark
/(?1)()((((((\1++))\x85)+)|))/
\x85\x85
-"(?|(\k'Pm')|(?'Pm'))"
+/(?|(\k'Pm')|(?'Pm'))/
abcd
/(?|(aaa)|(b))\g{1}/
@@ -6411,20 +6404,20 @@ ef) x/x,mark
Hackdaws love my big sphinx of quartz.
Pack my fox with five dozen liquor jugs.
-"(?<=X(?(DEFINE)(A)))X(*F)"
+/(?<=X(?(DEFINE)(A)))X(*F)/
\= Expect no match
AXYZ
-"(?<=X(?(DEFINE)(A)))."
+/(?<=X(?(DEFINE)(A)))./
AXYZ
-"(?<=X(?(DEFINE)(.*))Y)."
+/(?<=X(?(DEFINE)(.*))Y)./
AXYZ
-"(?<=X(?(DEFINE)(Y))(?1))."
+/(?<=X(?(DEFINE)(Y))(?1))./
AXYZ
-"(?(DEFINE)(?<foo>bar))(?<![-a-z0-9])word"
+/(?(DEFINE)(?<foo>bar))(?<![-a-z0-9])word/
word
# End of testinput1
diff --git a/testdata/testinput2 b/testdata/testinput2
index 47320eb..14ad824 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -5866,4 +5866,20 @@ a)"xI
/(?(VERSION=0.0/
+# Perl has made \K in lookarounds an error. At the moment PCRE2 still accepts.
+
+/(?=a\Kb)ab/
+ ab
+
+/(?!a\Kb)ac/
+ ac
+
+/^abc(?<=b\Kc)d/
+ abcd
+
+/^abc(?<!b\Kq)d/
+ abcd
+
+# ---------
+
# End of testinput2
diff --git a/testdata/testinput4 b/testdata/testinput4
index 0bdac57..4e2a0ab 100644
--- a/testdata/testinput4
+++ b/testdata/testinput4
@@ -3,6 +3,10 @@
# some of the property tests may differ because of different versions of
# Unicode in use by PCRE2 and Perl.
+# WARNING: Use only / as the pattern delimiter. Although pcre2test supports
+# a number of delimiters, all those other than / give problems with the
+# perltest.sh script.
+
#newline_default lf anycrlf any
#perltest
@@ -476,7 +480,7 @@
/^\ሴ/utf
-"(?s)(.{1,5})"utf
+/(?s)(.{1,5})/utf
abcdefg
ab
@@ -2220,7 +2224,7 @@
/[A-`]/i,utf
abcdefghijklmno
-"[\S\V\H]"utf
+/[\S\V\H]/utf
/[^\p{Any}]*+x/utf
x
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index 470e412..47d42ee 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -1,6 +1,10 @@
# This set of tests is for features that are compatible with all versions of
# Perl >= 5.10, in non-UTF mode. It should run clean for the 8-bit, 16-bit, and
# 32-bit PCRE libraries, and also using the perltest.sh script.
+
+# WARNING: Use only / as the pattern delimiter. Although pcre2test supports
+# a number of delimiters, all those other than / give problems with the
+# perltest.sh script.
#forbid_utf
#newline_default lf any anycrlf
@@ -2949,7 +2953,7 @@ No match
qqq\nabc\nzzz
No match
-"(?>.*/)foo"
+/(?>.*\/)foo/
/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
\= Expect no match
@@ -6081,14 +6085,16 @@ No match
A\x20B
0:
-"(?x)(?-x: \s*#\s*)"
+/(?x)(?-x: \s*#\s*)/
A # B
0: #
\= Expect no match
#
No match
+ A s#s B
+No match
-"(?x-is)(?:(?-ixs) \s*#\s*) include"
+/(?x-is)(?:(?-ixs) \s*#\s*) include/
A #include
0: #include
\= Expect no match
@@ -8402,12 +8408,12 @@ No match
1: <unset>
2: wxyz
-"(?>.*)foo"
+/(?>.*)foo/
\= Expect no match
abcdfooxyz
No match
-"(?>.*?)foo"
+/(?>.*?)foo/
abcdfooxyz
0: foo
@@ -8648,22 +8654,6 @@ No match
a
No match
-/(?=a\Kb)ab/
- ab
- 0: b
-
-/(?!a\Kb)ac/
- ac
- 0: ac
-
-/^abc(?<=b\Kc)d/
- abcd
- 0: cd
-
-/^abc(?<!b\Kq)d/
- abcd
- 0: abcd
-
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/x,mark
\= Expect no match
AAAC
@@ -9128,9 +9118,9 @@ No match
/(\2)(\1)/
-"Z*(|d*){216}"
+/Z*(|d*){216}/
-"(?1)(?#?'){8}(a)"
+/(?1)(?#?'){8}(a)/
baaaaaaaaac
0: aaaaaaaaa
1: a
@@ -9166,7 +9156,7 @@ No match
6:
7:
-"(?|(\k'Pm')|(?'Pm'))"
+/(?|(\k'Pm')|(?'Pm'))/
abcd
0:
1:
@@ -10165,24 +10155,24 @@ No match
Pack my fox with five dozen liquor jugs.
No match
-"(?<=X(?(DEFINE)(A)))X(*F)"
+/(?<=X(?(DEFINE)(A)))X(*F)/
\= Expect no match
AXYZ
No match
-"(?<=X(?(DEFINE)(A)))."
+/(?<=X(?(DEFINE)(A)))./
AXYZ
0: Y
-"(?<=X(?(DEFINE)(.*))Y)."
+/(?<=X(?(DEFINE)(.*))Y)./
AXYZ
0: Z
-"(?<=X(?(DEFINE)(Y))(?1))."
+/(?<=X(?(DEFINE)(Y))(?1))./
AXYZ
0: Z
-"(?(DEFINE)(?<foo>bar))(?<![-a-z0-9])word"
+/(?(DEFINE)(?<foo>bar))(?<![-a-z0-9])word/
word
0: word
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index c06363a..d0592d3 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -17624,6 +17624,26 @@ MK: >\x00<
/(?(VERSION=0.0/
Failed: error 179 at offset 14: syntax error or number too big in (?(VERSION condition
+# Perl has made \K in lookarounds an error. At the moment PCRE2 still accepts.
+
+/(?=a\Kb)ab/
+ ab
+ 0: b
+
+/(?!a\Kb)ac/
+ ac
+ 0: ac
+
+/^abc(?<=b\Kc)d/
+ abcd
+ 0: cd
+
+/^abc(?<!b\Kq)d/
+ abcd
+ 0: abcd
+
+# ---------
+
# End of testinput2
Error -70: PCRE2_ERROR_BADDATA (unknown error number)
Error -62: bad serialized data
diff --git a/testdata/testoutput4 b/testdata/testoutput4
index 245a036..f43d940 100644
--- a/testdata/testoutput4
+++ b/testdata/testoutput4
@@ -3,6 +3,10 @@
# some of the property tests may differ because of different versions of
# Unicode in use by PCRE2 and Perl.
+# WARNING: Use only / as the pattern delimiter. Although pcre2test supports
+# a number of delimiters, all those other than / give problems with the
+# perltest.sh script.
+
#newline_default lf anycrlf any
#perltest
@@ -795,7 +799,7 @@ No match
0: \x{1234}
-"(?s)(.{1,5})"utf
+/(?s)(.{1,5})/utf
abcdefg
0: abcde
1: abcde
@@ -3596,7 +3600,7 @@ No match
abcdefghijklmno
0: a
-"[\S\V\H]"utf
+/[\S\V\H]/utf
/[^\p{Any}]*+x/utf
x
--
2.25.4

View File

@ -0,0 +1,157 @@
From 58040c3b15f966857eef0b35885800f0805e7c7a Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Fri, 29 May 2020 14:20:23 +0000
Subject: [PATCH] Fix inifinite loop when a single byte newline is searched 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@1258 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.35.
---
src/pcre2_jit_compile.c | 9 ++++++++-
src/pcre2_jit_test.c | 38 +++++++++++++++++++++++++-------------
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index 33ad7e6..4a3ddd8 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -4578,7 +4578,14 @@ if (common->nltype != NLTYPE_ANY)
/* All newlines are ascii, just skip intermediate octets. */
jump[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
loop = LABEL();
- OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_SUPP | SLJIT_MEM_POST, TMP2, SLJIT_MEM1(STR_PTR), IN_UCHARS(1)) == SLJIT_SUCCESS)
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_POST, TMP2, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ else
+ {
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+
OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xc0);
CMPTO(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, 0x80, loop);
OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c
index a29fffa..16dade7 100644
--- a/src/pcre2_jit_test.c
+++ b/src/pcre2_jit_test.c
@@ -1831,7 +1831,9 @@ struct invalid_utf8_regression_test_case {
const char *input;
};
-static struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cases[] = {
+static const char invalid_utf8_newline_cr;
+
+static const struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cases[] = {
{ UDA, CI, 0, 0, 0, 0, 4, { ".", NULL }, "\xf4\x8f\xbf\xbf" },
{ UDA, CI, 0, 0, 0, 0, 4, { ".", NULL }, "\xf0\x90\x80\x80" },
{ UDA, CI, 0, 0, 0, -1, -1, { ".", NULL }, "\xf4\x90\x80\x80" },
@@ -1974,6 +1976,8 @@ static struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cas
{ 0, PCRE2_JIT_COMPLETE, 0, 0, 1, -1, -1, { "\\X{2}", NULL }, "\r\n\n" },
{ 0, PCRE2_JIT_COMPLETE, 0, 0, 1, -1, -1, { "\\R{2}", NULL }, "\r\n\n" },
+ { PCRE2_UTF | PCRE2_MULTILINE, CI, 0, 0, 0, -1, -1, { "^.a", &invalid_utf8_newline_cr }, "\xc3\xa7#a" },
+
{ 0, 0, 0, 0, 0, 0, 0, { NULL, NULL }, NULL }
};
@@ -1981,7 +1985,7 @@ static struct invalid_utf8_regression_test_case invalid_utf8_regression_test_cas
#undef CI
#undef CPI
-static int run_invalid_utf8_test(struct invalid_utf8_regression_test_case *current,
+static int run_invalid_utf8_test(const struct invalid_utf8_regression_test_case *current,
int pattern_index, int i, pcre2_compile_context_8 *ccontext, pcre2_match_data_8 *mdata)
{
pcre2_code_8 *code;
@@ -2034,7 +2038,7 @@ static int run_invalid_utf8_test(struct invalid_utf8_regression_test_case *curre
static int invalid_utf8_regression_tests(void)
{
- struct invalid_utf8_regression_test_case *current;
+ const struct invalid_utf8_regression_test_case *current;
pcre2_compile_context_8 *ccontext;
pcre2_match_data_8 *mdata;
int total = 0, successful = 0;
@@ -2051,10 +2055,18 @@ static int invalid_utf8_regression_tests(void)
total++;
result = 1;
- if (!run_invalid_utf8_test(current, total - 1, 0, ccontext, mdata))
- result = 0;
- if (!run_invalid_utf8_test(current, total - 1, 1, ccontext, mdata))
- result = 0;
+ if (current->pattern[1] != &invalid_utf8_newline_cr)
+ {
+ if (!run_invalid_utf8_test(current, total - 1, 0, ccontext, mdata))
+ result = 0;
+ if (!run_invalid_utf8_test(current, total - 1, 1, ccontext, mdata))
+ result = 0;
+ } else {
+ pcre2_set_newline_8(ccontext, PCRE2_NEWLINE_CR);
+ if (!run_invalid_utf8_test(current, total - 1, 0, ccontext, mdata))
+ result = 0;
+ pcre2_set_newline_8(ccontext, PCRE2_NEWLINE_ANY);
+ }
if (result) {
successful++;
@@ -2128,7 +2140,7 @@ static PCRE2_UCHAR16 test16_10[] = { ' ', 0xdc00, 0xd800, 0x2028, '#', 0 };
static PCRE2_UCHAR16 test16_11[] = { 0xdc00, 0xdc00, 0xd800, 0xdc00, 0xdc00, '#', 0xd800, 0xdc00, '#', 0 };
static PCRE2_UCHAR16 test16_12[] = { '#', 0xd800, 0xdc00, 0xd800, '#', 0xd800, 0xdc00, 0xdc00, 0xdc00, '#', 0xd800, 0xdc00, '#', 0 };
-static struct invalid_utf16_regression_test_case invalid_utf16_regression_test_cases[] = {
+static const struct invalid_utf16_regression_test_case invalid_utf16_regression_test_cases[] = {
{ UDA, CI, 0, 0, 0, 0, 1, { allany16, NULL }, test16_1 },
{ UDA, CI, 1, 0, 0, 1, 2, { allany16, NULL }, test16_1 },
{ UDA, CI, 2, 0, 0, 2, 3, { allany16, NULL }, test16_1 },
@@ -2182,7 +2194,7 @@ static struct invalid_utf16_regression_test_case invalid_utf16_regression_test_c
#undef CI
#undef CPI
-static int run_invalid_utf16_test(struct invalid_utf16_regression_test_case *current,
+static int run_invalid_utf16_test(const struct invalid_utf16_regression_test_case *current,
int pattern_index, int i, pcre2_compile_context_16 *ccontext, pcre2_match_data_16 *mdata)
{
pcre2_code_16 *code;
@@ -2242,7 +2254,7 @@ static int run_invalid_utf16_test(struct invalid_utf16_regression_test_case *cur
static int invalid_utf16_regression_tests(void)
{
- struct invalid_utf16_regression_test_case *current;
+ const struct invalid_utf16_regression_test_case *current;
pcre2_compile_context_16 *ccontext;
pcre2_match_data_16 *mdata;
int total = 0, successful = 0;
@@ -2329,7 +2341,7 @@ static PCRE2_UCHAR32 test32_4[] = { '#', 0x10ffff, 0x110000, 0 };
static PCRE2_UCHAR32 test32_5[] = { ' ', 0x2028, '#', 0 };
static PCRE2_UCHAR32 test32_6[] = { ' ', 0x110000, 0x2028, '#', 0 };
-static struct invalid_utf32_regression_test_case invalid_utf32_regression_test_cases[] = {
+static const struct invalid_utf32_regression_test_case invalid_utf32_regression_test_cases[] = {
{ UDA, CI, 0, 0, 0, 0, 1, { allany32, NULL }, test32_1 },
{ UDA, CI, 2, 0, 0, -1, -1, { allany32, NULL }, test32_1 },
{ UDA, CI, 0, 0, 0, 0, 1, { allany32, NULL }, test32_2 },
@@ -2369,7 +2381,7 @@ static struct invalid_utf32_regression_test_case invalid_utf32_regression_test_c
#undef CI
#undef CPI
-static int run_invalid_utf32_test(struct invalid_utf32_regression_test_case *current,
+static int run_invalid_utf32_test(const struct invalid_utf32_regression_test_case *current,
int pattern_index, int i, pcre2_compile_context_32 *ccontext, pcre2_match_data_32 *mdata)
{
pcre2_code_32 *code;
@@ -2429,7 +2441,7 @@ static int run_invalid_utf32_test(struct invalid_utf32_regression_test_case *cur
static int invalid_utf32_regression_tests(void)
{
- struct invalid_utf32_regression_test_case *current;
+ const struct invalid_utf32_regression_test_case *current;
pcre2_compile_context_32 *ccontext;
pcre2_match_data_32 *mdata;
int total = 0, successful = 0;
--
2.25.4

View File

@ -0,0 +1,38 @@
From 842cc30948723f3fe3e7e71ebcb18191ae5324ed Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Tue, 26 May 2020 15:18:35 +0000
Subject: [PATCH 2/2] Fix previous commit: include CET_CFLAGS in 16-bit and
32-bit builds under AutoTools.
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@1257 6239d852-aaf2-0410-a92c-79f79f948069
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index af6b92b..6a771a5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -405,6 +405,7 @@ nodist_libpcre2_16_la_SOURCES = \
libpcre2_16_la_CFLAGS = \
-DPCRE2_CODE_UNIT_WIDTH=16 \
$(VISIBILITY_CFLAGS) \
+ $(CET_CFLAGS) \
$(AM_CFLAGS)
libpcre2_16_la_LIBADD =
endif # WITH_PCRE2_16
@@ -418,6 +419,7 @@ nodist_libpcre2_32_la_SOURCES = \
libpcre2_32_la_CFLAGS = \
-DPCRE2_CODE_UNIT_WIDTH=32 \
$(VISIBILITY_CFLAGS) \
+ $(CET_CFLAGS) \
$(AM_CFLAGS)
libpcre2_32_la_LIBADD =
endif # WITH_PCRE2_32
--
2.25.4

View File

@ -0,0 +1,56 @@
From 4089a9d71445fbe48ce41dd5cb595dba88c18a26 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Mon, 29 Jun 2020 15:35:49 +0000
Subject: [PATCH] Fix read overflow for invalid VERSION test with one
fractional digit at the end of a pattern. Fixes ClusterFuzz 23779.
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@1266 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.35.
---
src/pcre2_compile.c | 1 +
testdata/testinput2 | 2 ++
testdata/testoutput2 | 3 +++
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
index 136d583..e811f12 100644
--- a/src/pcre2_compile.c
+++ b/src/pcre2_compile.c
@@ -4331,6 +4331,7 @@ while (ptr < ptrend)
{
if (++ptr >= ptrend || !IS_DIGIT(*ptr)) goto BAD_VERSION_CONDITION;
minor = (*ptr++ - CHAR_0) * 10;
+ if (ptr >= ptrend) goto BAD_VERSION_CONDITION;
if (IS_DIGIT(*ptr)) minor += *ptr++ - CHAR_0;
if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS)
goto BAD_VERSION_CONDITION;
diff --git a/testdata/testinput2 b/testdata/testinput2
index c816c5f..47320eb 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -5864,4 +5864,6 @@ a)"xI
/"(*MARK:>" 00 "<).(?C1)."/hex,mark,no_start_optimize
AB
+/(?(VERSION=0.0/
+
# End of testinput2
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index c90efef..c06363a 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -17621,6 +17621,9 @@ Latest Mark: >\x00<
0: AB
MK: >\x00<
+/(?(VERSION=0.0/
+Failed: error 179 at offset 14: syntax error or number too big in (?(VERSION condition
+
# End of testinput2
Error -70: PCRE2_ERROR_BADDATA (unknown error number)
Error -62: bad serialized data
--
2.25.4

View File

@ -0,0 +1,94 @@
From 5002a59a8289027b8a88c4933077a9b66e839d6c Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Sat, 19 Sep 2020 03:49:32 +0000
Subject: [PATCH] Fixed a bug in character set matching when JIT is enabled.
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@1273 6239d852-aaf2-0410-a92c-79f79f948069
Petr Písař: Ported to 10.35.
---
src/pcre2_jit_compile.c | 36 ++++++++++++++++++++++++++++--------
src/pcre2_jit_test.c | 1 +
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index edf64d5..04f0278 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -7672,25 +7672,43 @@ if (needstype || needsscript)
}
cc = ccbegin;
- }
- if (needschar)
- OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
+ if (needstype)
+ {
+ /* TMP2 has already been shifted by 2 */
+ if (!needschar)
+ {
+ OP2(SLJIT_ADD, TMP1, 0, TMP2, 0, TMP2, 0);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
+
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
+ }
+ else
+ {
+ OP2(SLJIT_ADD, TMP1, 0, TMP2, 0, TMP2, 0);
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
- if (needstype)
+ OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
+ OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
+ typereg = RETURN_ADDR;
+ }
+ }
+ else if (needschar)
+ OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
+ }
+ else if (needstype)
{
+ OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2);
+
if (!needschar)
{
- OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3);
- OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2);
OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
}
else
{
- OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2);
- OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
@@ -7698,6 +7716,8 @@ if (needstype || needsscript)
typereg = RETURN_ADDR;
}
}
+ else if (needschar)
+ OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
}
#endif /* SUPPORT_UNICODE */
diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c
index b7856ad..d935887 100644
--- a/src/pcre2_jit_test.c
+++ b/src/pcre2_jit_test.c
@@ -409,6 +409,7 @@ static struct regression_test_case regression_test_cases[] = {
{ MUP, A, 0, 0 | F_PROPERTY, "[\xc3\xa2-\xc3\xa6\xc3\x81-\xc3\x84\xe2\x80\xa8-\xe2\x80\xa9\xe6\x92\xad\\p{Zs}]{2,}", "\xe2\x80\xa7\xe2\x80\xa9\xe6\x92\xad \xe6\x92\xae" },
{ MUP, A, 0, 0 | F_PROPERTY, "[\\P{L&}]{2}[^\xc2\x85-\xc2\x89\\p{Ll}\\p{Lu}]{2}", "\xc3\xa9\xe6\x92\xad.a\xe6\x92\xad|\xc2\x8a#" },
{ PCRE2_UCP, 0, 0, 0 | F_PROPERTY, "[a-b\\s]{2,5}[^a]", "AB baaa" },
+ { MUP, 0, 0, 0 | F_NOMATCH, "[^\\p{Hangul}\\p{Z}]", " " },
/* Possible empty brackets. */
{ MU, A, 0, 0, "(?:|ab||bc|a)+d", "abcxabcabd" },
--
2.25.4

View File

@ -0,0 +1,206 @@
From fe0ad31fe2c2f7f5e32cf3a07c060bcc86a52003 Mon Sep 17 00:00:00 2001
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Mon, 14 Sep 2020 15:39:39 +0000
Subject: [PATCH] Update pcre2test to check delimiters after #perltest and fix
some in test 1.
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@1270 6239d852-aaf2-0410-a92c-79f79f948069
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
doc/pcre2test.1 | 27 ++++++++++++++++-----------
src/pcre2test.c | 8 ++++++++
testdata/testinput1 | 18 +++++++++---------
testdata/testoutput1 | 18 +++++++++---------
4 files changed, 42 insertions(+), 29 deletions(-)
diff --git a/doc/pcre2test.1 b/doc/pcre2test.1
index ec17763..19ab8be 100644
--- a/doc/pcre2test.1
+++ b/doc/pcre2test.1
@@ -1,4 +1,4 @@
-.TH PCRE2TEST 1 "20 March 2020" "PCRE 10.35"
+.TH PCRE2TEST 1 "14 September 2020" "PCRE 10.36"
.SH NAME
pcre2test - a program for testing Perl-compatible regular expressions.
.SH SYNOPSIS
@@ -273,7 +273,7 @@ test data, command lines that begin with # may appear. This file format, with
some restrictions, can also be processed by the \fBperltest.sh\fP script that
is distributed with PCRE2 as a means of checking that the behaviour of PCRE2
and Perl is the same. For a specification of \fBperltest.sh\fP, see the
-comments near its beginning.
+comments near its beginning. See also the #perltest command below.
.P
When the input is a terminal, \fBpcre2test\fP prompts for each line of input,
using "re>" to prompt for regular expression patterns, and "data>" to prompt
@@ -369,14 +369,19 @@ patterns. Modifiers on a pattern can change these settings.
.sp
#perltest
.sp
-The appearance of this line causes all subsequent modifier settings to be
-checked for compatibility with the \fBperltest.sh\fP script, which is used to
-confirm that Perl gives the same results as PCRE2. Also, apart from comment
-lines, #pattern commands, and #subject commands that set or unset "mark", no
-command lines are permitted, because they and many of the modifiers are
-specific to \fBpcre2test\fP, and should not be used in test files that are also
-processed by \fBperltest.sh\fP. The \fB#perltest\fP command helps detect tests
-that are accidentally put in the wrong file.
+This line is used in test files that can also be processed by \fBperltest.sh\fP
+to confirm that Perl gives the same results as PCRE2. Subsequent tests are
+checked for the use of \fBpcre2test\fP features that are incompatible with the
+\fBperltest.sh\fP script.
+.P
+Patterns must use '/' as their delimiter, and only certain modifiers are
+supported. Comment lines, #pattern commands, and #subject commands that set or
+unset "mark" are recognized and acted on. The #perltest, #forbid_utf, and
+#newline_default commands, which are needed in the relevant pcre2test files,
+are silently ignored. All other command lines are ignored, but give a warning
+message. The \fB#perltest\fP command helps detect tests that are accidentally
+put in the wrong file or use the wrong delimiter. For more details of the
+\fBperltest.sh\fP script see the comments it contains.
.sp
#pop [<modifiers>]
#popcopy [<modifiers>]
@@ -2096,6 +2101,6 @@ Cambridge, England.
.rs
.sp
.nf
-Last updated: 20 March 2020
+Last updated: 14 September 2020
Copyright (c) 1997-2020 University of Cambridge.
.fi
diff --git a/src/pcre2test.c b/src/pcre2test.c
index 3f4fef4..2999352 100644
--- a/src/pcre2test.c
+++ b/src/pcre2test.c
@@ -5136,6 +5136,14 @@ PCRE2_SIZE patlen;
PCRE2_SIZE valgrind_access_length;
PCRE2_SIZE erroroffset;
+/* The perltest.sh script supports only / as a delimiter. */
+
+if (restrict_for_perl_test && delimiter != '/')
+ {
+ fprintf(outfile, "** The only allowed delimiter after #perltest is '/'\n");
+ return PR_ABEND;
+ }
+
/* Initialize the context and pattern/data controls for this test from the
defaults. */
diff --git a/testdata/testinput1 b/testdata/testinput1
index 8a50cfa..d4e42ba 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -5652,16 +5652,16 @@ name)/mark
\= Expect no match
acb
-'\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++'
+/\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
-'\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
+/\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
-'\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++'
+/\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
-'\A([^\"1]++|[\"2]([^\"3]*+|[\"4][\"5])*+[\"6])++'
+/\A([^\"1]++|[\"2]([^\"3]*+|[\"4][\"5])*+[\"6])++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
/^\w+(?>\s*)(?<=\w)/
@@ -5826,19 +5826,19 @@ ef) x/x,mark
\= Expect no match
aab
-'(?>ab|abab){1,5}?M'
+/(?>ab|abab){1,5}?M/
abababababababababababM
-'(?>ab|abab){2}?M'
+/(?>ab|abab){2}?M/
abababM
-'((?(?=(a))a)+k)'
+/((?(?=(a))a)+k)/
bbak
-'((?(?=(a))a|)+k)'
+/((?(?=(a))a|)+k)/
bbak
-'(?(?!(b))a|b)+k'
+/(?(?!(b))a|b)+k/
ababbalbbadabak
/(?!(b))c|b/
diff --git a/testdata/testoutput1 b/testdata/testoutput1
index 47d42ee..16c91d2 100644
--- a/testdata/testoutput1
+++ b/testdata/testoutput1
@@ -8978,19 +8978,19 @@ No match
acb
No match
-'\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++'
+/\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
0: NON QUOTED "QUOT""ED" AFTER
-'\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
+/\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
0: NON QUOTED "QUOT""ED" AFTER
-'\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++'
+/\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
0: NON QUOTED "QUOT""ED" AFTER
-'\A([^\"1]++|[\"2]([^\"3]*+|[\"4][\"5])*+[\"6])++'
+/\A([^\"1]++|[\"2]([^\"3]*+|[\"4][\"5])*+[\"6])++/
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
0: NON QUOTED "QUOT""ED" AFTER
1: AFTER
@@ -9312,27 +9312,27 @@ No match
aab
No match
-'(?>ab|abab){1,5}?M'
+/(?>ab|abab){1,5}?M/
abababababababababababM
0: abababababM
-'(?>ab|abab){2}?M'
+/(?>ab|abab){2}?M/
abababM
0: ababM
-'((?(?=(a))a)+k)'
+/((?(?=(a))a)+k)/
bbak
0: ak
1: ak
2: a
-'((?(?=(a))a|)+k)'
+/((?(?=(a))a|)+k)/
bbak
0: ak
1: ak
2: a
-'(?(?!(b))a|b)+k'
+/(?(?!(b))a|b)+k/
ababbalbbadabak
0: abak
1: b
--
2.25.4

6
pcre2.rpmlintrc Normal file
View File

@ -0,0 +1,6 @@
from Config import *
addFilter("spelling-error .* encodings");
# sljit upstream does not make any releases
addFilter("unversioned-explicit-provides bundled\\(sljit\\)");
# Documentation is in a required pcre2-devel package
addFilter("pcre2-static.* no-documentation");

789
pcre2.spec Normal file
View File

@ -0,0 +1,789 @@
# Add readline edditing in pcre2test tool
%bcond_without pcre2_enables_readline
# Disable SELinux-frindly JIT allocator because it seems not to be fork-safe,
# https://bugs.exim.org/show_bug.cgi?id=1749#c45
%bcond_with pcre2_enables_sealloc
# This is stable release:
#%%global rcversion RC1
Name: pcre2
Version: 10.35
Release: %{?rcversion:0.}7%{?rcversion:.%rcversion}%{?dist}
%global myversion %{version}%{?rcversion:-%rcversion}
Summary: Perl-compatible regular expression library
# the library: BSD with exceptions
# pcre2test (linked to GNU readline): BSD (linked to GPLv3+)
# COPYING: see LICENCE file
# LICENSE: BSD text with exceptions and
# Public Domain declaration
# for testdata
#Bundled
# src/sljit: BSD
#Not distributed in any binary package
# aclocal.m4: FSFULLR and GPLv2+ with exception
# ar-lib: GPLv2+ with exception
# cmake/COPYING-CMAKE-SCRIPTS: BSD
# compile: GPLv2+ with exception
# config.guess: GPLv3+ with exception
# config.sub: GPLv3+ with exception
# configure: FSFUL and GPLv2+ with exception
# depcomp: GPLv2+ with exception
# INSTALL: FSFAP
# install-sh: MIT
# ltmain.sh: GPLv2+ with exception and (MIT or GPLv3+)
# m4/ax_pthread.m4: GPLv3+ with exception
# m4/libtool.m4: FSFUL and FSFULLR and
# GPLv2+ with exception
# m4/ltoptions.m4: FSFULLR
# m4/ltsugar.m4: FSFULLR
# m4/ltversion.m4: FSFULLR
# m4/lt~obsolete.m4: FSFULLR
# m4/pcre2_visibility.m4: FSFULLR
# Makefile.in: FSFULLR
# missing: GPLv2+ with exception
# test-driver: GPLv2+ with exception
# testdata: Public Domain
License: BSD
URL: https://www.pcre.org/
Source0: https://ftp.pcre.org/pub/pcre/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2
Source1: https://ftp.pcre.org/pub/pcre/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2.sig
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
# 1/2 Enable shadow stack built-in functions if -fcf-protection compiler flag is
# used, upstream bug #2578, in upstream after 10.35
Patch1: pcre2-10.35-Apply-H.J.-Lu-s-patch-to-pass-mshstk-to-the-compiler.patch
# 2/2 Enable shadow stack built-in functions if -fcf-protection compiler flag is
# used, upstream bug #2578, in upstream after 10.35
Patch2: pcre2-10.35-Fix-previous-commit-include-CET_CFLAGS-in-16-bit-and.patch
# Fix an infinite loop when a single-byte newline is search in JIT if an
# invalid UTF-8 mode is enabled, upstream bug #2581, in upstream after 10.35
Patch3: pcre2-10.35-Fix-inifinite-loop-when-a-single-byte-newline-is-sea.patch
# Fix a buffer overread when parsing an unterminated VERSION condition with
# a single-digit minor number at the end of a regular expression,
# ClusterFuzz #23779, in upstream after 10.35
Patch4: pcre2-10.35-Fix-read-overflow-for-invalid-VERSION-test-with-one-.patch
# Fix an early fail optimization with character ranges and a buffer overread
# in JIT, upstream bug #2621, in upstream after 10.35
Patch5: pcre2-10.35-Fix-an-early-fail-optimization-issue-and-a-buffer-ov.patch
# Fix escaping test data, upstream bug #2641, in upstream after 10.35
Patch6: pcre2-10.35-Fix-delimiters-in-tests-1-and-4-for-correct-Perl-beh.patch
# Fix escaping test data and only allow slash delimiter after perltest pragma,
# upstream bug #2641, in upstream after 10.35
Patch7: pcre2-10.35-Update-pcre2test-to-check-delimiters-after-perltest-.patch
# Fix a mismatch when caselessly searching in an invalid UTF-8 text and a start
# optimization is enabled, upstream bug #2642, in upstream after 10.35
Patch8: pcre2-10.35-Fix-Bugzilla-2642-no-match-bug-in-8-bit-mode-for-cas.patch
# Fix matching a character set when JIT is enabled and both Unicode script and
# Unicode class are present, upstream bug #2644, in upstream after 10.35
Patch9: pcre2-10.35-Fixed-a-bug-in-character-set-matching-when-JIT-is-en.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: gnupg2
BuildRequires: libtool
BuildRequires: make
%if %{with pcre2_enables_readline}
BuildRequires: readline-devel
%endif
BuildRequires: sed
Requires: %{name}-syntax = %{version}-%{release}
Provides: bundled(sljit)
%description
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
expression) library to provide an entirely new API.
PCRE2 is written in C, and it has its own API. There are three sets of
functions, one for the 8-bit library, which processes strings of bytes, one
for the 16-bit library, which processes strings of 16-bit values, and one for
the 32-bit library, which processes strings of 32-bit values. There are no C++
wrappers. This package provides support for strings in 8-bit and UTF-8
encodings. Install %{name}-utf16 or %{name}-utf32 packages for the other ones.
The distribution does contain a set of C wrapper functions for the 8-bit
library that are based on the POSIX regular expression API (see the pcre2posix
man page). These can be found in a library called libpcre2posix. Note that
this just provides a POSIX calling interface to PCRE2; the regular expressions
themselves still follow Perl syntax and semantics. The POSIX API is
restricted, and does not give full access to all of PCRE2's facilities.
%package utf16
Summary: UTF-16 variant of PCRE2
Provides: bundled(sljit)
Requires: %{name}-syntax = %{version}-%{release}
Conflicts: %{name}%{?_isa} < 10.21-4
%description utf16
This is PCRE2 library working on UTF-16 strings.
%package utf32
Summary: UTF-32 variant of PCRE2
Provides: bundled(sljit)
Requires: %{name}-syntax = %{version}-%{release}
Conflicts: %{name}%{?_isa} < 10.21-4
%description utf32
This is PCRE2 library working on UTF-32 strings.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-utf16%{?_isa} = %{version}-%{release}
Requires: %{name}-utf32%{?_isa} = %{version}-%{release}
%description devel
Development files (headers, libraries for dynamic linking, documentation)
for %{name}. The header file for the POSIX-style functions is called
pcre2posix.h.
%package static
Summary: Static library for %{name}
Requires: %{name}-devel%{_isa} = %{version}-%{release}
Provides: bundled(sljit)
%description static
Library for static linking for %{name}.
%package syntax
Summary: Documentation for PCRE2 regular expressions
BuildArch: noarch
Conflicts: %{name}-devel < 10.34-8
%description syntax
This is a set of manual pages that document a syntax of the regular
expressions implemented by the PCRE2 library.
%package tools
Summary: Auxiliary utilities for %{name}
# pcre2test (linked to GNU readline): BSD (linked to GPLv3+)
License: BSD and GPLv3+
Requires: %{name}%{_isa} = %{version}-%{release}
%description tools
Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%setup -q -n %{name}-%{myversion}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
# Because of multilib patch
libtoolize --copy --force
autoreconf -vif
%build
# There is a strict-aliasing problem on PPC64, bug #881232
%ifarch ppc64
%global optflags %{optflags} -fno-strict-aliasing
%endif
%configure \
%ifarch s390 s390x sparc64 sparcv9 riscv64
--disable-jit \
--disable-pcre2grep-jit \
%else
--enable-jit \
--enable-pcre2grep-jit \
%endif
--disable-bsr-anycrlf \
--disable-coverage \
--disable-ebcdic \
--disable-fuzz-support \
%if %{with pcre2_enables_sealloc}
--enable-jit-sealloc \
%else
--disable-jit-sealloc \
%endif
--disable-never-backslash-C \
--enable-newline-is-lf \
--enable-pcre2-8 \
--enable-pcre2-16 \
--enable-pcre2-32 \
--enable-pcre2grep-callout \
--enable-pcre2grep-callout-fork \
--disable-pcre2grep-libbz2 \
--disable-pcre2grep-libz \
--disable-pcre2test-libedit \
%if %{with pcre2_enables_readline}
--enable-pcre2test-libreadline \
%else
--disable-pcre2test-libreadline \
%endif
--enable-percent-zt \
--disable-rebuild-chartables \
--enable-shared \
--disable-silent-rules \
--enable-static \
--enable-unicode \
--disable-valgrind
%{make_build}
%install
%{make_install}
# Get rid of unneeded *.la files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
# These are handled by %%doc in %%files
rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre2
%check
make %{?_smp_mflags} check VERBOSE=yes
%files
%{_libdir}/libpcre2-8.so.0*
%{_libdir}/libpcre2-posix.so.2*
%files utf16
%{_libdir}/libpcre2-16.so.0*
%files utf32
%{_libdir}/libpcre2-32.so.0*
%files devel
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*.h
%{_mandir}/man1/pcre2-config.*
%{_mandir}/man3/pcre2_*
%{_mandir}/man3/pcre2api.*
%{_mandir}/man3/pcre2build.*
%{_mandir}/man3/pcre2callout.*
%{_mandir}/man3/pcre2convert.*
%{_mandir}/man3/pcre2demo.*
%{_mandir}/man3/pcre2jit.*
%{_mandir}/man3/pcre2posix.*
%{_mandir}/man3/pcre2sample.*
%{_mandir}/man3/pcre2serialize*
%{_bindir}/pcre2-config
%doc doc/*.txt doc/html
%doc README HACKING ./src/pcre2demo.c
%files static
%{_libdir}/*.a
%license COPYING LICENCE
%files syntax
%license COPYING LICENCE
%doc AUTHORS ChangeLog NEWS
%{_mandir}/man3/pcre2.*
%{_mandir}/man3/pcre2compat.*
%{_mandir}/man3/pcre2limits.*
%{_mandir}/man3/pcre2matching.*
%{_mandir}/man3/pcre2partial.*
%{_mandir}/man3/pcre2pattern.*
%{_mandir}/man3/pcre2perform.*
%{_mandir}/man3/pcre2syntax.*
%{_mandir}/man3/pcre2unicode.*
%files tools
%{_bindir}/pcre2grep
%{_bindir}/pcre2test
%{_mandir}/man1/pcre2grep.*
%{_mandir}/man1/pcre2test.*
%changelog
* Mon Sep 21 2020 Petr Pisar <ppisar@redhat.com> - 10.35-7
- Fix matching a character set when JIT is enabled and both Unicode script and
Unicode class are present (upstream bug #2644)
* Wed Sep 16 2020 Petr Pisar <ppisar@redhat.com> - 10.35-6
- Fix escaping test data and only allow slash delimiter after perltest pragma
(upstream bug #2641)
- Fix a mismatch when caselessly searching in an invalid UTF-8 text and a start
optimization is enabled (upstream bug #2642)
* Mon Sep 14 2020 Petr Pisar <ppisar@redhat.com> - 10.35-5
- Fix escaping test data (upstream bug #2641)
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.35-4.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 15 2020 Petr Pisar <ppisar@redhat.com> - 10.35-4
- Fix a buffer overread when parsing an unterminated VERSION condition with
a single-digit minor number at the end of a regular expression
(ClusterFuzz #23779)
- Fix an early fail optimization with character ranges and a buffer overread
in JIT (upstream bug #2621)
* Tue Jun 02 2020 Petr Pisar <ppisar@redhat.com> - 10.35-3
- Fix an infinite loop when a single-byte newline is search in JIT if an
invalid UTF-8 mode is enabled (upstream bug #2581)
* Wed May 27 2020 Petr Pisar <ppisar@redhat.com> - 10.35-2
- Enable shadow stack built-in functions if -fcf-protection compiler flag is
used by patching a build script (upstream bug #2578)
* Mon May 11 2020 Petr Pisar <ppisar@redhat.com> - 10.35-1
- 10.35 bump
* Mon Apr 27 2020 Petr Pisar <ppisar@redhat.com> - 10.35-0.2.RC1
- Fix a compiler warning about -1 index
* Thu Apr 16 2020 Petr Pisar <ppisar@redhat.com> - 10.35-0.1.RC1
- 10.35-RC1 bump
* Mon Mar 23 2020 Petr Pisar <ppisar@redhat.com> - 10.34-9
- Fix a JIT compilation of the Unicode scripts in the extended character classes
(upstream bug #2432)
* Mon Mar 16 2020 Petr Pisar <ppisar@redhat.com> - 10.34-8
- Fix computing an offest for the start of the UTF-16 error when a high
surrogate is not followed by a valid low surrogate (upstream bug #2527)
- Fix compiling a lookbehind when preceded by a DEFINE group
(upstream bug #2531)
- Make manual pages about pattern syntax available when the library is
installed (bug #1808612)
* Thu Feb 20 2020 Petr Pisar <ppisar@redhat.com> - 10.34-7
- Fix a crash in JIT when an invalid UTF-8 character is encountered in
match_invalid_utf mode (upstream bug #2529)
* Mon Feb 17 2020 Petr Pisar <ppisar@redhat.com> - 10.34-6
- Fix restoring a verb chain list when exiting a JIT-compiled recursive
function
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.34-5.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Jan 27 2020 Petr Pisar <ppisar@redhat.com> - 10.34-5
- Fix a memory leak when allocating a JIT stack fails
- Ensure a newline after the final line in a file is output by pcre2grep
(upstream bug #2513)
- Fix processing (?(DEFINE)...) within look-behind assertions
- Prevent from a stack exhaustion when studying a pattern for nested groups by
putting a limit of 1000 recursive calls
* Mon Jan 13 2020 Petr Pisar <ppisar@redhat.com> - 10.34-4
- Fix a crash in JITted code when a *THEN verb is used in a lookahead assertion
(upstream bug #2510)
* Mon Dec 09 2019 Petr Pisar <ppisar@redhat.com> - 10.34-3
- Fix a crash in pcre2_jit_compile when passing a NULL code argument (upstream
bug #2487)
* Thu Nov 28 2019 Petr Pisar <ppisar@redhat.com> - 10.34-2
- Fix JIT to respect NOTEMPTY options (upstream bug #2473)
* Fri Nov 22 2019 Petr Pisar <ppisar@redhat.com> - 10.34-1
- 10.34 bump
* Mon Nov 18 2019 Petr Pisar <ppisar@redhat.com> - 10.34-0.2.RC2
- Fix optimized caseless matching of non-ASCII characters in assertions
(upstream bug #2466)
* Thu Nov 07 2019 Petr Pisar <ppisar@redhat.com> - 10.34-0.1.RC2
- 10.34-RC2 bump
- Fix an infinite loop in 64-bit ARM JIT with NEON instructions
* Wed Oct 30 2019 Petr Pisar <ppisar@redhat.com> - 10.34-0.1.RC1
- 10.34-RC1 bump
* Tue Oct 29 2019 Petr Pisar <ppisar@redhat.com> - 10.33-15
- Fix a use after free when freeing JIT memory (upstream bug #2453)
- Fix thread-safeness in regexec() (upstream bug #2447)
* Mon Sep 09 2019 Petr Pisar <ppisar@redhat.com> - 10.33-14
- Fix a crash in JIT match when a subject has a zero length and an invalid
pointer (upstream bug #2440)
* Tue Aug 27 2019 Petr Pisar <ppisar@redhat.com> - 10.33-13
- Readd a fix for a mismatch with a lookbehind within a lookahead within
a lookbehind and fix the regression in matching a lookbehind after
a condition (bug #1743863)
* Mon Aug 26 2019 Petr Pisar <ppisar@redhat.com> - 10.33-12
- Revert a fix for a mismatch with a lookbehind within a lookahead within
a lookbehind (bug #1743863)
* Mon Aug 12 2019 Petr Pisar <ppisar@redhat.com> - 10.33-11
- Fix reporting rightmost consulted characters
* Mon Aug 05 2019 Petr Pisar <ppisar@redhat.com> - 10.33-10
- Fix an incorrect computation of a group length when a branch exceeds 65535
(upstream bug #2428)
- Use HTTPS protocol in URL metadata
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 10.33-9.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 22 2019 Petr Pisar <ppisar@redhat.com> - 10.33-9
- Fix a recursion in compiling an expression with a lookbehind within a
lookahead (upstream bug #2412)
* Wed Jul 17 2019 Petr Pisar <ppisar@redhat.com> - 10.33-8
- Fix a mismatch with a lookbehind within a lookahead within a lookbehind
(upstream bug #2412)
* Thu Jul 11 2019 Petr Pisar <ppisar@redhat.com> - 10.33-7
- Fix an integer overflow when checking a lookbehind length
* Wed Jul 03 2019 Petr Pisar <ppisar@redhat.com> - 10.33-6
- Fix a DFA to recognize a partial match if the end of a subject is encountered
in a lookahead, an atomic group, or a recursion
* Thu Jun 20 2019 Petr Pisar <ppisar@redhat.com> - 10.33-5
- Do not ignore {1} quantifier when it is applied to a non-possessive group
with more alternatives
* Mon Jun 17 2019 Petr Pisar <ppisar@redhat.com> - 10.33-4
- Fix a non-JIT match to return (*MARK) names from a successful conditional
assertion
- Fix pcre2grep --only-matching output when number of capturing groups exceeds
32 (upstream bug #2407)
* Mon May 13 2019 Petr Pisar <ppisar@redhat.com> - 10.33-3
- Correct a misspelling in a documentation
- Fix a crash when \X is used without UTF mode in a JIT (upstream bug #2399)
* Mon May 06 2019 Petr Pisar <ppisar@redhat.com> - 10.33-2
- Validate number of capturing parentheses
* Tue Apr 16 2019 Petr Pisar <ppisar@redhat.com> - 10.33-1
- 10.33 bump
* Tue Mar 26 2019 Petr Pisar <ppisar@redhat.com> - 10.33-0.4.RC1
- Do not use SSE2 instructions on x86 CPUs without SSE2 support
(upstream bug #2385)
* Wed Mar 13 2019 Petr Pisar <ppisar@redhat.com> - 10.33-0.3.RC1
- Use upstream fix for a crash in pcre2_substitute() function if mcontext
argument is NULL (bug #1686434)
* Mon Mar 11 2019 Petr Pisar <ppisar@redhat.com> - 10.33-0.2.RC1
- Fix a crash in pcre2_substitute() function if mcontext argument is NULL
(bug #1686434)
* Tue Mar 05 2019 Petr Pisar <ppisar@redhat.com> - 10.33-0.1.RC1
- 10.33-RC1 bump
* Fri Feb 22 2019 Petr Pisar <ppisar@redhat.com> - 10.32-8
- Fix pcre2_pattern_info() documentation (upstream bug #2373)
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 10.32-7.1
- Rebuild for readline 8.0
* Thu Jan 31 2019 Petr Pisar <ppisar@redhat.com> - 10.32-7
- Fix version conditions in DFA engine (upstream bug #2367)
- Use an upstream fix for POSIX names as macros (bug #1667614)
* Tue Jan 22 2019 Petr Pisar <ppisar@redhat.com> - 10.32-6
- Link applications to PCRE2-specific symbols when using POSIX API (bug #1667614)
* Thu Jan 03 2019 Petr Pisar <ppisar@redhat.com> - 10.32-5
- Fix anchoring a pattern preceded with (*MARK)
- Fix OpenPOWER 64-bit ELFv2 ABI detection in JIT compiler (upstream bug #2353)
- Fix an undefined behavior in aarch64 JIT compiler (upstream bug #2355)
* Thu Nov 01 2018 Petr Pisar <ppisar@redhat.com> - 10.32-4
- Fix matching a zero-repeated subroutine call at a start of a pattern
(upstream bug #2332)
- Fix heap limit checking overflow in pcre2_dfa_match() (upstream bug #2334)
* Mon Sep 24 2018 Petr Pisar <ppisar@redhat.com> - 10.32-3
- Fix caseless matching an extended class in JIT mode (upstream bug #2321)
* Tue Sep 18 2018 Petr Pisar <ppisar@redhat.com> - 10.32-2
- Fix a subject buffer overread in JIT when UTF is disabled and \X or \R has
a greater than 1 fixed quantifier (upstream bug #2320)
* Wed Sep 12 2018 Petr Pisar <ppisar@redhat.com> - 10.32-1
- 10.32 bump
* Mon Sep 03 2018 Petr Pisar <ppisar@redhat.com> - 10.32-0.3.RC1
- Accept \N{U+hhhh} only in UTF mode (upstream bug #2305)
- Fix anchoring in conditionals with only one branch (upstream bug #2307)
* Mon Aug 20 2018 Petr Pisar <ppisar@redhat.com> - 10.32-0.2.RC1
- Fix autopossessifying a repeated negative class with no characters less than
256 that is followed by a positive class with only characters less than 256,
(upstream bug #2300)
* Thu Aug 16 2018 Petr Pisar <ppisar@redhat.com> - 10.32-0.1.RC1
- 10.32-RC1 bump
* Thu Aug 16 2018 Petr Pisar <ppisar@redhat.com> - 10.31-9
- Recognize all Unicode space characters with /x option in a pattern
- Fix changing dynamic options
* Tue Jul 31 2018 Petr Pisar <ppisar@redhat.com> - 10.31-8
- Fix backtracking atomic groups when they are not separated by something with
a backtracking point
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10.31-7.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 09 2018 Petr Pisar <ppisar@redhat.com> - 10.31-7
- Fix checking that a lookbehind assertion has a fixed length if the
lookbehind assertion is used inside a lookahead assertion
- Fix parsing VERSION conditions
* Mon Jul 02 2018 Petr Pisar <ppisar@redhat.com> - 10.31-6
- Fix global search/replace in pcre2test and pcre2_substitute() when the pattern
matches an empty string, but never at the starting offset
* Mon Jun 25 2018 Petr Pisar <ppisar@redhat.com> - 10.31-5
- Fix bug when \K is used in a lookbehind in a substitute pattern
* Fri Mar 16 2018 Petr Pisar <ppisar@redhat.com> - 10.31-4
- Fix setting error offset zero for early errors in pcre2_pattern_convert()
* Mon Feb 26 2018 Petr Pisar <ppisar@redhat.com> - 10.31-3
- Add support to pcre2grep for binary zeros in -f files (upstream bug #2222)
- Fix compiler warnings in pcre2grep
* Tue Feb 20 2018 Petr Pisar <ppisar@redhat.com> - 10.31-2
- Fix returning unset groups in POSIX interface if REG_STARTEND has a non-zero
starting offset (upstream bug #2244)
- Fix pcre2test -C to correctly show what \R matches
- Fix matching repeated character classes against an 8-bit string containting
multi-code-unit characters
* Mon Feb 12 2018 Petr Pisar <ppisar@redhat.com> - 10.31-1
- 10.31 bump
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10.31-0.3.RC1.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 10.31-0.3.RC1.1
- Switch to %%ldconfig_scriptlets
* Thu Feb 01 2018 Petr Pisar <ppisar@redhat.com> - 10.31-0.3.RC1
- Fix auto-possessification at the end of a capturing group that is called
recursively (upstream bug #2232)
* Tue Jan 30 2018 Petr Pisar <ppisar@redhat.com> - 10.31-0.2.RC1
- Enlarge ovector array match data structure to be large enough in all cases
(oss-fuzz #5415)
* Mon Jan 15 2018 Petr Pisar <ppisar@redhat.com> - 10.31-0.1.RC1
- 10.31-RC1 bump
* Fri Jan 12 2018 Petr Pisar <ppisar@redhat.com> - 10.30-5
- Fix handling \K in an assertion in pcre2grep tool and documentation
(upstream bug #2211)
- Fix matching at a first code unit of a new line sequence if PCRE2_FIRSTLINE
is enabled
* Fri Dec 22 2017 Petr Pisar <ppisar@redhat.com> - 10.30-4
- Fix pcre2_jit_match() to properly check the pattern was JIT-compiled
- Allow pcre2grep match counter to handle values larger than 2147483647,
(upstream bug #2208)
- Fix incorrect first matching character when a backreference with zero minimum
repeat starts a pattern (upstream bug #2209)
* Mon Nov 13 2017 Petr Pisar <ppisar@redhat.com> - 10.30-3
- Fix multi-line matching in pcre2grep tool (upstream bug #2187)
* Thu Nov 02 2017 Petr Pisar <ppisar@redhat.com> - 10.30-2
- Accept files names longer than 128 bytes in recursive mode of pcre2grep
(upstream bug #2177)
* Tue Aug 15 2017 Petr Pisar <ppisar@redhat.com> - 10.30-1
- 10.30 bump
* Wed Aug 02 2017 Petr Pisar <ppisar@redhat.com> - 10.30-0.6.RC1
- Disable SELinux-friendly JIT allocator because it crashes after a fork
(upstream bug #1749)
* Mon Jul 31 2017 Petr Pisar <ppisar@redhat.com> - 10.30-0.5.RC1
- Fix handling a hyphen at the end of a character class (upstream bug #2153)
* Sat Jul 29 2017 Florian Weimer <fweimer@redhat.com> - 10.30-0.4.RC1
- Rebuild with binutils fix for ppc64le (#1475636)
* Thu Jul 27 2017 Petr Pisar <ppisar@redhat.com> - 10.30-0.3.RC1
- Fix applying local x modifier while global xx was in effect
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 10.30-0.2.RC1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jul 24 2017 Petr Pisar <ppisar@redhat.com> - 10.30-0.2.RC1
- Fix a compiler warning in JIT code for ppc32
* Thu Jul 20 2017 Petr Pisar <ppisar@redhat.com> - 10.30-0.1.RC1
- 10.30-RC1 bump
- Heap-based matching implementation replaced stack-based one
- SELinux-friendly JIT enabled
* Fri Jun 16 2017 Petr Pisar <ppisar@redhat.com> - 10.23-8
- Fix DFA matching a lookbehind assertion that has a zero-length branch
(PCRE2 oss-fuzz issue 1859)
- Fix returned offsets from regexec() when REG_STARTEND is used with starting offset
greater than zero (upstream bug #2128)
* Tue May 09 2017 Petr Pisar <ppisar@redhat.com> - 10.23-7
- Fix a pcre2test crash on multiple push statements (upstream bug #2109)
* Tue Apr 18 2017 Petr Pisar <ppisar@redhat.com> - 10.23-6
- Fix CVE-2017-7186 in JIT mode (a crash when finding a Unicode property for
a character with a code point greater than 0x10ffff in UTF-32 library while
UTF mode is disabled) (bug #1434504)
- Fix an incorrect cast in UTF validation (upstream bug #2090)
* Mon Mar 27 2017 Petr Pisar <ppisar@redhat.com> - 10.23-5
- Fix DFA match for a possessively repeated character class (upstream bug #2086)
- Use a memory allocator from the pattern if no context is supplied to
pcre2_match()
* Wed Mar 22 2017 Petr Pisar <ppisar@redhat.com> - 10.23-4
- Close serialization file in pcre2test after any error (upstream bug #2074)
- Fix a memory leak in pcre2_serialize_decode() when the input is invalid
(upstream bug #2075)
- Fix a potential NULL dereference in pcre2_callout_enumerate() if called with
a NULL pattern pointer when Unicode support is available (upstream bug #2076)
- Fix CVE-2017-8786 (32-bit error buffer size bug in pcre2test) (bug #1500717)
* Mon Mar 20 2017 Petr Pisar <ppisar@redhat.com> - 10.23-3
- Fix an internal error for a forward reference in a lookbehind with
PCRE2_ANCHORED (oss-fuzz bug #865)
- Fix a pcre2test bug for global match with zero terminated subject
(upstream bug #2063)
* Mon Feb 27 2017 Petr Pisar <ppisar@redhat.com> - 10.23-2
- Handle memmory allocation failures in pcre2test tool
- Fix CVE-2017-7186 (a crash when finding a Unicode property for a character
with a code point greater than 0x10ffff in UTF-32 library while UTF mode is
disabled) (upstream bug #2052)
* Tue Feb 14 2017 Petr Pisar <ppisar@redhat.com> - 10.23-1
- 10.23 bump
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 10.23-0.1.RC1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jan 17 2017 Petr Pisar <ppisar@redhat.com> - 10.23-0.1.RC1
- 10.23-RC1 bump
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 10.22-10.1
- Rebuild for readline 7.x
* Thu Jan 12 2017 Petr Pisar <ppisar@redhat.com> - 10.22-10
- Fix an out-of-bound read in pcre2test tool within POSIX mode
(upstream bug #2008)
* Tue Jan 03 2017 Petr Pisar <ppisar@redhat.com> - 10.22-9
- Fix compiling a class with UCP and without UTF
* Fri Dec 16 2016 Petr Pisar <ppisar@redhat.com> - 10.22-8
- Fix a crash when doing an extended substitution for \p, \P, or \X
(upstream bug #1977)
- Fix a crash in substitution if starting offest was specified beyond the
subject end (upstream bug #1992)
* Fri Dec 09 2016 Petr Pisar <ppisar@redhat.com> - 10.22-7
- Fix pcre2-config --libs-posix output (upstream bug #1924)
- Fix a memory leak and a typo in a documentation (upstream bug #1973)
- Fix a buffer overflow in partial match test for CRLF in an empty buffer
(upstream bug #1975)
- Fix a crash in pcre2test when displaying a wide character with a set locate
(upstream bug #1976)
* Tue Nov 08 2016 Petr Pisar <ppisar@redhat.com> - 10.22-6
- Fix faulty auto-anchoring patterns when .* is inside an assertion
* Mon Oct 24 2016 Petr Pisar <ppisar@redhat.com> - 10.22-5
- Document assert capture limitation (upstream bug #1887)
- Ignore offset modifier in pcre2test in POSIX mode (upstream bug #1898)
* Wed Oct 19 2016 Richard W.M. Jones <@redhat.com> - 10.22-4
- Disable the JIT on riscv64.
* Wed Oct 19 2016 Petr Pisar <ppisar@redhat.com> - 10.22-3
- Fix displaying a callout position in pcretest output with an escape sequence
greater than \x{ff}
- Fix pcrepattern(3) documentation
- Fix miscopmilation of conditionals when a group name start with "R"
(upstream bug #1873)
- Fix internal option documentation in pcre2pattern(3) (upstream bug #1875)
- Fix optimization bugs for patterns starting with lookaheads
(upstream bug #1882)
* Mon Aug 29 2016 Petr Pisar <ppisar@redhat.com> - 10.22-2
- Fix matching characters above 255 when a negative character type was used
without enabled UCP in a positive class (upstream bug #1866)
* Fri Jul 29 2016 Petr Pisar <ppisar@redhat.com> - 10.22-1
- 10.22 bump
* Thu Jun 30 2016 Petr Pisar <ppisar@redhat.com> - 10.22-0.1.RC1
- 10.22-RC1 bump
- libpcre2-posix library changed ABI
- Fix register overwite in JIT when SSE2 acceleration is enabled
- Correct pcre2unicode(3) documentation
* Mon Jun 20 2016 Petr Pisar <ppisar@redhat.com> - 10.21-6
- Fix repeated pcregrep output if -o with -M options were used and the match
extended over a line boundary (upstream bug #1848)
* Fri Jun 03 2016 Petr Pisar <ppisar@redhat.com> - 10.21-5
- Fix a race in JIT locking condition
- Fix an ovector check in JIT test program
- Enable JIT in the pcre2grep tool
* Mon Mar 07 2016 Petr Pisar <ppisar@redhat.com> - 10.21-4
- Ship README in devel as it covers API and build, not general info
- Move UTF-16 and UTF-32 libraries into pcre-ut16 and pcre-32 subpackages
* Mon Feb 29 2016 Petr Pisar <ppisar@redhat.com> - 10.21-3
- Fix a typo in pcre2_study()
* Thu Feb 11 2016 Petr Pisar <ppisar@redhat.com> - 10.21-2
- Report unmatched closing parantheses properly
- Fix pcre2test for expressions with a callout inside a look-behind assertion
(upstream bug #1783)
- Fix CVE-2016-3191 (workspace overflow for (*ACCEPT) with deeply nested
parentheses) (upstream bug #1791)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 10.21-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jan 12 2016 Petr Pisar <ppisar@redhat.com> - 10.21-1
- 10.21 bump
* Wed Jan 06 2016 Petr Pisar <ppisar@redhat.com> - 10.21-0.2.RC1
- Adapt a test to French locale on RHEL
* Tue Jan 05 2016 Petr Pisar <ppisar@redhat.com> - 10.21-0.1.RC1
- 10.21-RC1 bump
* Mon Oct 26 2015 Petr Pisar <ppisar@redhat.com> - 10.20-3
- Fix compiling patterns with PCRE2_NO_AUTO_CAPTURE (upstream bug #1704)
* Mon Oct 12 2015 Petr Pisar <ppisar@redhat.com> - 10.20-2
- Fix compiling classes with a negative escape and a property escape
(upstream bug #1697)
- Fix integer overflow for patterns whose minimum matching length is large
(upstream bug #1699)
* Fri Jul 03 2015 Petr Pisar <ppisar@redhat.com> - 10.20-1
- 10.20 bump
* Fri Jun 19 2015 Petr Pisar <ppisar@redhat.com> - 10.20-0.1.RC1
- 10.20-RC1 bump
- Replace dependency on glibc-headers with gcc (bug #1230479)
- Preserve soname
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 10.10-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri May 29 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 10.10-3
- fixed Release field
* Fri May 29 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 10.10-2.1
- Backport fix for AArch64
* Tue May 05 2015 Petr Pisar <ppisar@redhat.com> - 10.10-2
- Package pcre2demo.c as a documentation for pcre2-devel
* Fri Mar 13 2015 Petr Pisar <ppisar@redhat.com> - 10.10-1
- PCRE2 library packaged

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (pcre2-10.35.tar.bz2) = ecfb8d48e219daff02874783b7b436fe7d70d8471e44eb66e1e29abb7b0aa67547e6b5fba7058b074ac90eef265ece7d12728f80afdda45b6b8124435f4561fd
SHA512 (pcre2-10.35.tar.bz2.sig) = b46d69877d3eaefca3756ec485e6f2df07afe88db228ca25751215c4077adecde16e7ccef0499067f2bdc943c88eba82f6b3d68762c479fc04491d88ed58ea39