10.36-RC1 bump
This commit is contained in:
parent
8a057ba535
commit
7ea7e7a347
2
.gitignore
vendored
2
.gitignore
vendored
@ -26,3 +26,5 @@
|
|||||||
/pcre2-10.35-RC1.tar.bz2.sig
|
/pcre2-10.35-RC1.tar.bz2.sig
|
||||||
/pcre2-10.35.tar.bz2
|
/pcre2-10.35.tar.bz2
|
||||||
/pcre2-10.35.tar.bz2.sig
|
/pcre2-10.35.tar.bz2.sig
|
||||||
|
/pcre2-10.36-RC1.tar.bz2
|
||||||
|
/pcre2-10.36-RC1.tar.bz2.sig
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,114 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,412 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,157 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
From fd5e04a35122c62584da5a9558f3b744a2d09692 Mon Sep 17 00:00:00 2001
|
|
||||||
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Tue, 27 Oct 2020 08:16:04 +0000
|
|
||||||
Subject: [PATCH] Fixed a word boundary check bug in JIT when partial matching
|
|
||||||
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@1280 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
Petr Písař: Ported to 10.35.
|
|
||||||
---
|
|
||||||
src/pcre2_jit_compile.c | 2 ++
|
|
||||||
testdata/testinput10 | 4 ++++
|
|
||||||
testdata/testoutput10 | 6 ++++++
|
|
||||||
|
|
||||||
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
|
|
||||||
index 04f0278..1977d28 100644
|
|
||||||
--- a/src/pcre2_jit_compile.c
|
|
||||||
+++ b/src/pcre2_jit_compile.c
|
|
||||||
@@ -6571,9 +6571,11 @@ if (common->invalid_utf)
|
|
||||||
|
|
||||||
if (common->mode != PCRE2_JIT_COMPLETE)
|
|
||||||
{
|
|
||||||
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
|
|
||||||
OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0);
|
|
||||||
move_back(common, NULL, TRUE);
|
|
||||||
check_start_used_ptr(common);
|
|
||||||
+ OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
|
|
||||||
OP1(SLJIT_MOV, STR_PTR, 0, TMP2, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/testdata/testinput10 b/testdata/testinput10
|
|
||||||
index efd3298..53e37cb 100644
|
|
||||||
--- a/testdata/testinput10
|
|
||||||
+++ b/testdata/testinput10
|
|
||||||
@@ -613,4 +613,8 @@
|
|
||||||
/A/utf,match_invalid_utf,caseless
|
|
||||||
\xe5A
|
|
||||||
|
|
||||||
+/\bch\b/utf,match_invalid_utf
|
|
||||||
+ qchq\=ph
|
|
||||||
+ qchq\=ps
|
|
||||||
+
|
|
||||||
# End of testinput10
|
|
||||||
diff --git a/testdata/testoutput10 b/testdata/testoutput10
|
|
||||||
index 2a3803f..d408510 100644
|
|
||||||
--- a/testdata/testoutput10
|
|
||||||
+++ b/testdata/testoutput10
|
|
||||||
@@ -1875,4 +1875,10 @@ Subject length lower bound = 1
|
|
||||||
\xe5A
|
|
||||||
0: A
|
|
||||||
|
|
||||||
+/\bch\b/utf,match_invalid_utf
|
|
||||||
+ qchq\=ph
|
|
||||||
+Partial match:
|
|
||||||
+ qchq\=ps
|
|
||||||
+Partial match:
|
|
||||||
+
|
|
||||||
# End of testinput10
|
|
||||||
--
|
|
||||||
2.25.4
|
|
||||||
|
|
@ -1,206 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
49
pcre2.spec
49
pcre2.spec
@ -6,10 +6,10 @@
|
|||||||
%bcond_with pcre2_enables_sealloc
|
%bcond_with pcre2_enables_sealloc
|
||||||
|
|
||||||
# This is stable release:
|
# This is stable release:
|
||||||
#%%global rcversion RC1
|
%global rcversion RC1
|
||||||
Name: pcre2
|
Name: pcre2
|
||||||
Version: 10.35
|
Version: 10.36
|
||||||
Release: %{?rcversion:0.}8%{?rcversion:.%rcversion}%{?dist}
|
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
|
||||||
%global myversion %{version}%{?rcversion:-%rcversion}
|
%global myversion %{version}%{?rcversion:-%rcversion}
|
||||||
Summary: Perl-compatible regular expression library
|
Summary: Perl-compatible regular expression library
|
||||||
# the library: BSD with exceptions
|
# the library: BSD with exceptions
|
||||||
@ -51,36 +51,6 @@ Source1: https://ftp.pcre.org/pub/pcre/%{?rcversion:Testing/}%{name}-%{myvers
|
|||||||
Source2: https://ftp.pcre.org/pub/pcre/Public-Key
|
Source2: https://ftp.pcre.org/pub/pcre/Public-Key
|
||||||
# Do no set RPATH if libdir is not /usr/lib
|
# Do no set RPATH if libdir is not /usr/lib
|
||||||
Patch0: pcre2-10.10-Fix-multilib.patch
|
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
|
|
||||||
# Fix a partial matching for a word boundary in JIT mode, upstream bug #2663,
|
|
||||||
# in upstream after 10.35.
|
|
||||||
Patch10: pcre2-10.35-Fixed-a-word-boundary-check-bug-in-JIT-when-partial-.patch
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: coreutils
|
BuildRequires: coreutils
|
||||||
@ -172,16 +142,6 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
|||||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||||
%setup -q -n %{name}-%{myversion}
|
%setup -q -n %{name}-%{myversion}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
# Because of multilib patch
|
# Because of multilib patch
|
||||||
libtoolize --copy --force
|
libtoolize --copy --force
|
||||||
autoreconf -vif
|
autoreconf -vif
|
||||||
@ -295,6 +255,9 @@ make %{?_smp_mflags} check VERBOSE=yes
|
|||||||
%{_mandir}/man1/pcre2test.*
|
%{_mandir}/man1/pcre2test.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 09 2020 Petr Pisar <ppisar@redhat.com> - 10.36-0.1.RC1
|
||||||
|
- 10.36-RC1 bump
|
||||||
|
|
||||||
* Tue Oct 27 2020 Petr Pisar <ppisar@redhat.com> - 10.35-8
|
* Tue Oct 27 2020 Petr Pisar <ppisar@redhat.com> - 10.35-8
|
||||||
- Fix a partial matching for a word boundary in JIT mode (upstream bug #2663)
|
- Fix a partial matching for a word boundary in JIT mode (upstream bug #2663)
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (pcre2-10.35.tar.bz2) = ecfb8d48e219daff02874783b7b436fe7d70d8471e44eb66e1e29abb7b0aa67547e6b5fba7058b074ac90eef265ece7d12728f80afdda45b6b8124435f4561fd
|
SHA512 (pcre2-10.36-RC1.tar.bz2) = ee5c7a6e4bfefb2c06709880d59546cbc01f948135d22578493e0ef8a6fb6e360b49a36c77d394f4a95220c7d9a964cd2edc72fc65238f0e2bc66f3f3a7a761a
|
||||||
SHA512 (pcre2-10.35.tar.bz2.sig) = b46d69877d3eaefca3756ec485e6f2df07afe88db228ca25751215c4077adecde16e7ccef0499067f2bdc943c88eba82f6b3d68762c479fc04491d88ed58ea39
|
SHA512 (pcre2-10.36-RC1.tar.bz2.sig) = 0066ea67c14e80f10b9bd6d581c74ca3b74471ea62fd4f495b8e55e03fd9ab3a9358332f5a9d4091d9e14545964a95c9b5668f6e964891d5bbc511b6e75b8847
|
||||||
|
Loading…
Reference in New Issue
Block a user