10.22-RC1 bump
FIXME: bump libpcre2-posix SONAME
This commit is contained in:
parent
308fe6b56a
commit
bd5df3f8c3
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
/pcre2-10.20.tar.bz2
|
/pcre2-10.20.tar.bz2
|
||||||
/pcre2-10.21-RC1.tar.bz2
|
/pcre2-10.21-RC1.tar.bz2
|
||||||
/pcre2-10.21.tar.bz2
|
/pcre2-10.21.tar.bz2
|
||||||
|
/pcre2-10.22-RC1.tar.bz2
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
From d317164a936f976aa94bcc88e4cc4d09b8354c27 Mon Sep 17 00:00:00 2001
|
|
||||||
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Thu, 19 May 2016 18:09:07 +0000
|
|
||||||
Subject: [PATCH] A racing condition is fixed in JIT reported by Mozilla.
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Ported to 10.21 from upstream:
|
|
||||||
|
|
||||||
commit 78c2458423ce34b08dd0a119b774e37c908d57ef
|
|
||||||
Author: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Thu May 19 18:09:07 2016 +0000
|
|
||||||
|
|
||||||
A racing condition is fixed in JIT reported by Mozilla.
|
|
||||||
|
|
||||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@514 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
src/sljit/sljitUtils.c | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/sljit/sljitUtils.c b/src/sljit/sljitUtils.c
|
|
||||||
index 5294b5f..b7ad3dc 100644
|
|
||||||
--- a/src/sljit/sljitUtils.c
|
|
||||||
+++ b/src/sljit/sljitUtils.c
|
|
||||||
@@ -182,7 +182,10 @@ static pthread_mutex_t dev_zero_mutex = PTHREAD_MUTEX_INITIALIZER;
|
|
||||||
static SLJIT_INLINE sljit_si open_dev_zero(void)
|
|
||||||
{
|
|
||||||
pthread_mutex_lock(&dev_zero_mutex);
|
|
||||||
- dev_zero = open("/dev/zero", O_RDWR);
|
|
||||||
+ /* The dev_zero might be initialized by another thread during the waiting. */
|
|
||||||
+ if (dev_zero < 0) {
|
|
||||||
+ dev_zero = open("/dev/zero", O_RDWR);
|
|
||||||
+ }
|
|
||||||
pthread_mutex_unlock(&dev_zero_mutex);
|
|
||||||
return dev_zero < 0;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.5.5
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
|||||||
From 3c570a60f7386ec026ef5dcafd54200d85826604 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Tue, 2 Feb 2016 17:22:55 +0000
|
|
||||||
Subject: [PATCH] Detect unmatched closing parentheses in the pre-scan to avoid
|
|
||||||
giving incorrect error messages.
|
|
||||||
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@484 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Petr Písař: Ported to 10.21.
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
src/pcre2_compile.c | 43 +++++++++++++++++++++----------------------
|
|
||||||
testdata/testinput2 | 2 ++
|
|
||||||
testdata/testoutput2 | 3 +++
|
|
||||||
3 files changed, 26 insertions(+), 22 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
|
|
||||||
index d852837..e33d620 100644
|
|
||||||
--- a/src/pcre2_compile.c
|
|
||||||
+++ b/src/pcre2_compile.c
|
|
||||||
@@ -3377,27 +3377,24 @@ for (; ptr < cb->end_pattern; ptr++)
|
|
||||||
if ((options & PCRE2_NO_AUTO_CAPTURE) == 0) cb->bracount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* (*something) - just skip to closing ket unless PCRE2_ALT_VERBNAMES is
|
|
||||||
- set, in which case we have to process escapes in the string after the
|
|
||||||
- name. */
|
|
||||||
+ /* (*something) - skip over a name, and then just skip to closing ket
|
|
||||||
+ unless PCRE2_ALT_VERBNAMES is set, in which case we have to process
|
|
||||||
+ escapes in the string after a verb name terminated by a colon. */
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ptr += 2;
|
|
||||||
while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0) ptr++;
|
|
||||||
- if (*ptr == CHAR_COLON)
|
|
||||||
+ if (*ptr == CHAR_COLON && (options & PCRE2_ALT_VERBNAMES) != 0)
|
|
||||||
{
|
|
||||||
ptr++;
|
|
||||||
- if ((options & PCRE2_ALT_VERBNAMES) != 0)
|
|
||||||
- {
|
|
||||||
- if (process_verb_name(&ptr, NULL, &errorcode, options, utf, cb) < 0)
|
|
||||||
- goto FAILED;
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- {
|
|
||||||
- while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS)
|
|
||||||
- ptr++;
|
|
||||||
- }
|
|
||||||
+ if (process_verb_name(&ptr, NULL, &errorcode, options, utf, cb) < 0)
|
|
||||||
+ goto FAILED;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS)
|
|
||||||
+ ptr++;
|
|
||||||
}
|
|
||||||
nest_depth--;
|
|
||||||
}
|
|
||||||
@@ -3748,7 +3745,12 @@ for (; ptr < cb->end_pattern; ptr++)
|
|
||||||
if (top_nest == (nest_save *)(cb->start_workspace)) top_nest = NULL;
|
|
||||||
else top_nest--;
|
|
||||||
}
|
|
||||||
- if (nest_depth > 0) nest_depth--; /* Can be 0 for unmatched ) */
|
|
||||||
+ if (nest_depth == 0) /* Unmatched closing parenthesis */
|
|
||||||
+ {
|
|
||||||
+ errorcode = ERR22;
|
|
||||||
+ goto FAILED;
|
|
||||||
+ }
|
|
||||||
+ nest_depth--;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8704,14 +8706,11 @@ if (cb.had_accept)
|
|
||||||
reqcuflags = REQ_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* If we have not reached end of pattern after a successful compile, there's an
|
|
||||||
-excess bracket. Fill in the final opcode and check for disastrous overflow.
|
|
||||||
-If no overflow, but the estimated length exceeds the really used length, adjust
|
|
||||||
-the value of re->blocksize, and if valgrind support is configured, mark the
|
|
||||||
-extra allocated memory as unaddressable, so that any out-of-bound reads can be
|
|
||||||
-detected. */
|
|
||||||
+/* Fill in the final opcode and check for disastrous overflow. If no overflow,
|
|
||||||
+but the estimated length exceeds the really used length, adjust the value of
|
|
||||||
+re->blocksize, and if valgrind support is configured, mark the extra allocated
|
|
||||||
+memory as unaddressable, so that any out-of-bound reads can be detected. */
|
|
||||||
|
|
||||||
-if (errorcode == 0 && ptr < cb.end_pattern) errorcode = ERR22;
|
|
||||||
*code++ = OP_END;
|
|
||||||
usedlength = code - codestart;
|
|
||||||
if (usedlength > length) errorcode = ERR23; else
|
|
||||||
diff --git a/testdata/testinput2 b/testdata/testinput2
|
|
||||||
index 071cca1..86c149d 100644
|
|
||||||
--- a/testdata/testinput2
|
|
||||||
+++ b/testdata/testinput2
|
|
||||||
@@ -4800,4 +4800,6 @@ a)"xI
|
|
||||||
/28 2a 4d 41 52 4b 3a 41 00 62 29/mark,hex,alt_verbnames
|
|
||||||
abc
|
|
||||||
|
|
||||||
+/(?J)(?'a'))(?'a')/
|
|
||||||
+
|
|
||||||
# End of testinput2
|
|
||||||
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
|
||||||
index 7178410..87c7204 100644
|
|
||||||
--- a/testdata/testoutput2
|
|
||||||
+++ b/testdata/testoutput2
|
|
||||||
@@ -15158,4 +15158,7 @@ MK: A\x00b
|
|
||||||
0:
|
|
||||||
MK: A\x00b
|
|
||||||
|
|
||||||
+/(?J)(?'a'))(?'a')/
|
|
||||||
+Failed: error 122 at offset 10: unmatched closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput2
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
From 6b1349313442390aed681582475f17956c73c9a3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Sun, 19 Jun 2016 16:07:56 +0000
|
|
||||||
Subject: [PATCH] Documentation clarification.
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Ported to 10.21:
|
|
||||||
|
|
||||||
commit cc7cc5af44c220acad1b9addff852a26c0e8ec46
|
|
||||||
Author: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Sun Jun 19 16:07:56 2016 +0000
|
|
||||||
|
|
||||||
Documentation clarification.
|
|
||||||
|
|
||||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@529 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
doc/pcre2grep.1 | 13 +++++++++----
|
|
||||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/pcre2grep.1 b/doc/pcre2grep.1
|
|
||||||
index 028a91e..f7fc40b 100644
|
|
||||||
--- a/doc/pcre2grep.1
|
|
||||||
+++ b/doc/pcre2grep.1
|
|
||||||
@@ -440,10 +440,15 @@ one line. The first is the line in which the match started, and the last is the
|
|
||||||
line in which the match ended. If the matched string ends with a newline
|
|
||||||
sequence the output ends at the end of that line.
|
|
||||||
.sp
|
|
||||||
-When this option is set, the PCRE2 library is called in "multiline" mode.
|
|
||||||
-However, \fBpcre2grep\fP still processes the input line by line. The difference
|
|
||||||
-is that a matched string may extend past the end of a line and continue on
|
|
||||||
-one or more subsequent lines. The newline sequence must be matched as part of
|
|
||||||
+When this option is set, the PCRE2 library is called in "multiline" mode. This
|
|
||||||
+allows a matched string to extend past the end of a line and continue on one or
|
|
||||||
+more subsequent lines. However, \fBpcre2grep\fP still processes the input line
|
|
||||||
+by line. Once a match has been handled, scanning restarts at the beginning of
|
|
||||||
+the next line, just as it does when \fB-M\fP is not present. This means that it
|
|
||||||
+is possible for the second or subsequent lines in a multiline match to be
|
|
||||||
+output again as part of another match.
|
|
||||||
+.sp
|
|
||||||
+The newline sequence that separates multiple lines must be matched as part of
|
|
||||||
the pattern. For example, to find the phrase "regular expression" in a file
|
|
||||||
where "regular" might be at the end of a line and "expression" at the start of
|
|
||||||
the next line, you could use this command:
|
|
||||||
--
|
|
||||||
2.5.5
|
|
||||||
|
|
@ -1,250 +0,0 @@
|
|||||||
From 05686e02ce782f3eee730abcdbe650b17efa2fb1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Fri, 17 Jun 2016 17:37:26 +0000
|
|
||||||
Subject: [PATCH] Fix bad interaction between -o and -M in pcre2grep.
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Ported to 10.21:
|
|
||||||
|
|
||||||
commit f5e35c292ede59a1d1d32f2f7ee3894515ccc5d6
|
|
||||||
Author: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Fri Jun 17 17:37:26 2016 +0000
|
|
||||||
|
|
||||||
Fix bad interaction between -o and -M in pcre2grep.
|
|
||||||
|
|
||||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@528 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
RunGrepTest | 12 ++++++++++++
|
|
||||||
src/pcre2grep.c | 36 ++++++++++++++++++++++--------------
|
|
||||||
testdata/grepinput | 13 +++++++++++++
|
|
||||||
testdata/grepoutput | 49 ++++++++++++++++++++++++++++++++++++++++---------
|
|
||||||
4 files changed, 87 insertions(+), 23 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/RunGrepTest b/RunGrepTest
|
|
||||||
index 67d672b..6bdd157 100755
|
|
||||||
--- a/RunGrepTest
|
|
||||||
+++ b/RunGrepTest
|
|
||||||
@@ -551,6 +551,18 @@ echo "---------------------------- Test 109 -----------------------------" >>tes
|
|
||||||
(cd $srcdir; $valgrind $pcre2grep -cq lazy ./testdata/grepinput*) >>testtrygrep
|
|
||||||
echo "RC=$?" >>testtrygrep
|
|
||||||
|
|
||||||
+echo "---------------------------- Test 110 -----------------------------" >>testtrygrep
|
|
||||||
+(cd $srcdir; $valgrind $vjs $pcre2grep --om-separator / -Mo0 -o1 -o2 'match (\d+):\n (.)\n' testdata/grepinput) >>testtrygrep
|
|
||||||
+echo "RC=$?" >>testtrygrep
|
|
||||||
+
|
|
||||||
+echo "---------------------------- Test 111 -----------------------------" >>testtrygrep
|
|
||||||
+(cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets -M 'match (\d+):\n (.)\n' testdata/grepinput) >>testtrygrep
|
|
||||||
+echo "RC=$?" >>testtrygrep
|
|
||||||
+
|
|
||||||
+echo "---------------------------- Test 112 -----------------------------" >>testtrygrep
|
|
||||||
+(cd $srcdir; $valgrind $vjs $pcre2grep --file-offsets -M 'match (\d+):\n (.)\n' testdata/grepinput) >>testtrygrep
|
|
||||||
+echo "RC=$?" >>testtrygrep
|
|
||||||
+
|
|
||||||
# Now compare the results.
|
|
||||||
|
|
||||||
$cf $srcdir/testdata/grepoutput testtrygrep
|
|
||||||
diff --git a/src/pcre2grep.c b/src/pcre2grep.c
|
|
||||||
index 703f675..3a5efd4 100644
|
|
||||||
--- a/src/pcre2grep.c
|
|
||||||
+++ b/src/pcre2grep.c
|
|
||||||
@@ -1591,7 +1591,7 @@ while (ptr < endptr)
|
|
||||||
size_t startoffset = 0;
|
|
||||||
|
|
||||||
/* At this point, ptr is at the start of a line. We need to find the length
|
|
||||||
- of the subject string to pass to pcre_exec(). In multiline mode, it is the
|
|
||||||
+ of the subject string to pass to pcre2_match(). In multiline mode, it is the
|
|
||||||
length remainder of the data in the buffer. Otherwise, it is the length of
|
|
||||||
the next line, excluding the terminating newline. After matching, we always
|
|
||||||
advance by the length of the next line. In multiline mode the PCRE2_FIRSTLINE
|
|
||||||
@@ -1680,7 +1680,7 @@ while (ptr < endptr)
|
|
||||||
|
|
||||||
match = match_patterns(matchptr, length, options, startoffset, &mrc);
|
|
||||||
options = PCRE2_NOTEMPTY;
|
|
||||||
-
|
|
||||||
+
|
|
||||||
/* If it's a match or a not-match (as required), do what's wanted. */
|
|
||||||
|
|
||||||
if (match != invert)
|
|
||||||
@@ -1776,14 +1776,22 @@ while (ptr < endptr)
|
|
||||||
if (printed || printname != NULL || number) fprintf(stdout, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* Prepare to repeat to find the next match. If the pattern contained a
|
|
||||||
- lookbehind that included \K, it is possible that the end of the match
|
|
||||||
- might be at or before the actual starting offset we have just used. In
|
|
||||||
- this case, start one character further on. */
|
|
||||||
+ /* Prepare to repeat to find the next match in the line. */
|
|
||||||
|
|
||||||
match = FALSE;
|
|
||||||
if (line_buffered) fflush(stdout);
|
|
||||||
rc = 0; /* Had some success */
|
|
||||||
+
|
|
||||||
+ /* If the current match ended past the end of the line (only possible
|
|
||||||
+ in multiline mode), we are done with this line. */
|
|
||||||
+
|
|
||||||
+ if (offsets[1] > linelength) goto END_ONE_MATCH;
|
|
||||||
+
|
|
||||||
+ /* If the pattern contained a lookbehind that included \K, it is
|
|
||||||
+ possible that the end of the match might be at or before the actual
|
|
||||||
+ starting offset we have just used. In this case, start one character
|
|
||||||
+ further on. */
|
|
||||||
+
|
|
||||||
startoffset = offsets[1]; /* Restart after the match */
|
|
||||||
oldstartoffset = pcre2_get_startchar(match_data);
|
|
||||||
if (startoffset <= oldstartoffset)
|
|
||||||
@@ -2488,24 +2496,24 @@ if ((popts & PO_FIXED_STRINGS) != 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf((char *)buffer, "%s%.*s%s", prefix[popts], patlen, ps, suffix[popts]);
|
|
||||||
-p->compiled = pcre2_compile(buffer, -1, options, &errcode, &erroffset,
|
|
||||||
- compile_context);
|
|
||||||
-
|
|
||||||
+p->compiled = pcre2_compile(buffer, PCRE2_ZERO_TERMINATED, options, &errcode,
|
|
||||||
+ &erroffset, compile_context);
|
|
||||||
+
|
|
||||||
/* Handle successful compile */
|
|
||||||
-
|
|
||||||
-if (p->compiled != NULL)
|
|
||||||
+
|
|
||||||
+if (p->compiled != NULL)
|
|
||||||
{
|
|
||||||
#ifdef SUPPORT_PCRE2GREP_JIT
|
|
||||||
if (use_jit)
|
|
||||||
{
|
|
||||||
errcode = pcre2_jit_compile(p->compiled, PCRE2_JIT_COMPLETE);
|
|
||||||
if (errcode == 0) return TRUE;
|
|
||||||
- erroffset = PCRE2_SIZE_MAX; /* Will get reduced to patlen below */
|
|
||||||
+ erroffset = PCRE2_SIZE_MAX; /* Will get reduced to patlen below */
|
|
||||||
}
|
|
||||||
- else
|
|
||||||
+ else
|
|
||||||
#endif
|
|
||||||
return TRUE;
|
|
||||||
- }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* Handle compile and JIT compile errors */
|
|
||||||
|
|
||||||
diff --git a/testdata/grepinput b/testdata/grepinput
|
|
||||||
index 0f00edd..b01643d 100644
|
|
||||||
--- a/testdata/grepinput
|
|
||||||
+++ b/testdata/grepinput
|
|
||||||
@@ -604,6 +604,19 @@ AB.VE the turtle
|
|
||||||
|
|
||||||
010203040506
|
|
||||||
|
|
||||||
+match 1:
|
|
||||||
+ a
|
|
||||||
+match 2:
|
|
||||||
+ b
|
|
||||||
+match 3:
|
|
||||||
+ c
|
|
||||||
+match 4:
|
|
||||||
+ d
|
|
||||||
+match 5:
|
|
||||||
+ e
|
|
||||||
+Rhubarb
|
|
||||||
+Custard Tart
|
|
||||||
+
|
|
||||||
PUT NEW DATA ABOVE THIS LINE.
|
|
||||||
=============================
|
|
||||||
|
|
||||||
diff --git a/testdata/grepoutput b/testdata/grepoutput
|
|
||||||
index 3f6704c..552bd70 100644
|
|
||||||
--- a/testdata/grepoutput
|
|
||||||
+++ b/testdata/grepoutput
|
|
||||||
@@ -10,7 +10,7 @@ RC=0
|
|
||||||
7:PATTERN at the start of a line.
|
|
||||||
8:In the middle of a line, PATTERN appears.
|
|
||||||
10:This pattern is in lower case.
|
|
||||||
-610:Check up on PATTERN near the end.
|
|
||||||
+623:Check up on PATTERN near the end.
|
|
||||||
RC=0
|
|
||||||
---------------------------- Test 4 ------------------------------
|
|
||||||
4
|
|
||||||
@@ -19,7 +19,7 @@ RC=0
|
|
||||||
./testdata/grepinput:7:PATTERN at the start of a line.
|
|
||||||
./testdata/grepinput:8:In the middle of a line, PATTERN appears.
|
|
||||||
./testdata/grepinput:10:This pattern is in lower case.
|
|
||||||
-./testdata/grepinput:610:Check up on PATTERN near the end.
|
|
||||||
+./testdata/grepinput:623:Check up on PATTERN near the end.
|
|
||||||
./testdata/grepinputx:3:Here is the pattern again.
|
|
||||||
./testdata/grepinputx:5:Pattern
|
|
||||||
./testdata/grepinputx:42:This line contains pattern not on a line by itself.
|
|
||||||
@@ -28,7 +28,7 @@ RC=0
|
|
||||||
7:PATTERN at the start of a line.
|
|
||||||
8:In the middle of a line, PATTERN appears.
|
|
||||||
10:This pattern is in lower case.
|
|
||||||
-610:Check up on PATTERN near the end.
|
|
||||||
+623:Check up on PATTERN near the end.
|
|
||||||
3:Here is the pattern again.
|
|
||||||
5:Pattern
|
|
||||||
42:This line contains pattern not on a line by itself.
|
|
||||||
@@ -324,10 +324,10 @@ RC=0
|
|
||||||
./testdata/grepinput-9-
|
|
||||||
./testdata/grepinput:10:This pattern is in lower case.
|
|
||||||
--
|
|
||||||
-./testdata/grepinput-607-PUT NEW DATA ABOVE THIS LINE.
|
|
||||||
-./testdata/grepinput-608-=============================
|
|
||||||
-./testdata/grepinput-609-
|
|
||||||
-./testdata/grepinput:610:Check up on PATTERN near the end.
|
|
||||||
+./testdata/grepinput-620-PUT NEW DATA ABOVE THIS LINE.
|
|
||||||
+./testdata/grepinput-621-=============================
|
|
||||||
+./testdata/grepinput-622-
|
|
||||||
+./testdata/grepinput:623:Check up on PATTERN near the end.
|
|
||||||
--
|
|
||||||
./testdata/grepinputx-1-This is a second file of input for the pcregrep tests.
|
|
||||||
./testdata/grepinputx-2-
|
|
||||||
@@ -349,8 +349,8 @@ RC=0
|
|
||||||
./testdata/grepinput-12-Here follows a whole lot of stuff that makes the file over 24K long.
|
|
||||||
./testdata/grepinput-13-
|
|
||||||
--
|
|
||||||
-./testdata/grepinput:610:Check up on PATTERN near the end.
|
|
||||||
-./testdata/grepinput-611-This is the last line of this file.
|
|
||||||
+./testdata/grepinput:623:Check up on PATTERN near the end.
|
|
||||||
+./testdata/grepinput-624-This is the last line of this file.
|
|
||||||
--
|
|
||||||
./testdata/grepinputx:3:Here is the pattern again.
|
|
||||||
./testdata/grepinputx-4-
|
|
||||||
@@ -755,3 +755,34 @@ RC=0
|
|
||||||
RC=0
|
|
||||||
---------------------------- Test 109 -----------------------------
|
|
||||||
RC=0
|
|
||||||
+---------------------------- Test 110 -----------------------------
|
|
||||||
+match 1:
|
|
||||||
+ a
|
|
||||||
+/1/a
|
|
||||||
+match 2:
|
|
||||||
+ b
|
|
||||||
+/2/b
|
|
||||||
+match 3:
|
|
||||||
+ c
|
|
||||||
+/3/c
|
|
||||||
+match 4:
|
|
||||||
+ d
|
|
||||||
+/4/d
|
|
||||||
+match 5:
|
|
||||||
+ e
|
|
||||||
+/5/e
|
|
||||||
+RC=0
|
|
||||||
+---------------------------- Test 111 -----------------------------
|
|
||||||
+607:0,12
|
|
||||||
+609:0,12
|
|
||||||
+611:0,12
|
|
||||||
+613:0,12
|
|
||||||
+615:0,12
|
|
||||||
+RC=0
|
|
||||||
+---------------------------- Test 112 -----------------------------
|
|
||||||
+37168,12
|
|
||||||
+37180,12
|
|
||||||
+37192,12
|
|
||||||
+37204,12
|
|
||||||
+37216,12
|
|
||||||
+RC=0
|
|
||||||
--
|
|
||||||
2.5.5
|
|
||||||
|
|
@ -1,174 +0,0 @@
|
|||||||
From 1c9ad4b954e5888ff6acdcb8e7073b123641b536 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Sat, 6 Feb 2016 16:40:59 +0000
|
|
||||||
Subject: [PATCH] Fix pcre2test loop when a callout is in an initial
|
|
||||||
lookbehind.
|
|
||||||
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@488 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Petr Písař: Ported to 10.21.
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
doc/pcre2test.1 | 4 +++-
|
|
||||||
src/pcre2test.c | 38 ++++++++++++++++++++++++++++----------
|
|
||||||
testdata/testinput2 | 5 +++++
|
|
||||||
testdata/testoutput2 | 15 +++++++++++++++
|
|
||||||
4 files changed, 51 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/pcre2test.1 b/doc/pcre2test.1
|
|
||||||
index b8eef93..4845cc7 100644
|
|
||||||
--- a/doc/pcre2test.1
|
|
||||||
+++ b/doc/pcre2test.1
|
|
||||||
@@ -1475,7 +1475,9 @@ item to be tested. For example:
|
|
||||||
This output indicates that callout number 0 occurred for a match attempt
|
|
||||||
starting at the fourth character of the subject string, when the pointer was at
|
|
||||||
the seventh character, and when the next pattern item was \ed. Just
|
|
||||||
-one circumflex is output if the start and current positions are the same.
|
|
||||||
+one circumflex is output if the start and current positions are the same, or if
|
|
||||||
+the current position precedes the start position, which can happen if the
|
|
||||||
+callout is in a lookbehind assertion.
|
|
||||||
.P
|
|
||||||
Callouts numbered 255 are assumed to be automatic callouts, inserted as a
|
|
||||||
result of the \fB/auto_callout\fP pattern modifier. In this case, instead of
|
|
||||||
diff --git a/src/pcre2test.c b/src/pcre2test.c
|
|
||||||
index 0a5879e..bc9099f 100644
|
|
||||||
--- a/src/pcre2test.c
|
|
||||||
+++ b/src/pcre2test.c
|
|
||||||
@@ -2546,12 +2546,13 @@ return (int)(pp - p);
|
|
||||||
|
|
||||||
/* Must handle UTF-8 strings in utf8 mode. Yields number of characters printed.
|
|
||||||
For printing *MARK strings, a negative length is given. If handed a NULL file,
|
|
||||||
-just counts chars without printing. */
|
|
||||||
+just counts chars without printing (because pchar() does that). */
|
|
||||||
|
|
||||||
static int pchars8(PCRE2_SPTR8 p, int length, BOOL utf, FILE *f)
|
|
||||||
{
|
|
||||||
uint32_t c = 0;
|
|
||||||
int yield = 0;
|
|
||||||
+
|
|
||||||
if (length < 0) length = p[-1];
|
|
||||||
while (length-- > 0)
|
|
||||||
{
|
|
||||||
@@ -2569,6 +2570,7 @@ while (length-- > 0)
|
|
||||||
c = *p++;
|
|
||||||
yield += pchar(c, utf, f);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
return yield;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -4975,6 +4977,7 @@ static int
|
|
||||||
callout_function(pcre2_callout_block_8 *cb, void *callout_data_ptr)
|
|
||||||
{
|
|
||||||
uint32_t i, pre_start, post_start, subject_length;
|
|
||||||
+PCRE2_SIZE current_position;
|
|
||||||
BOOL utf = (FLD(compiled_code, overall_options) & PCRE2_UTF) != 0;
|
|
||||||
BOOL callout_capture = (dat_datctl.control & CTL_CALLOUT_CAPTURE) != 0;
|
|
||||||
|
|
||||||
@@ -5025,21 +5028,36 @@ if (callout_capture)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Re-print the subject in canonical form, the first time or if giving full
|
|
||||||
-datails. On subsequent calls in the same match, we use pchars just to find the
|
|
||||||
-printed lengths of the substrings. */
|
|
||||||
+/* Re-print the subject in canonical form (with escapes for non-printing
|
|
||||||
+characters), the first time, or if giving full details. On subsequent calls in
|
|
||||||
+the same match, we use PCHARS() just to find the printed lengths of the
|
|
||||||
+substrings. */
|
|
||||||
|
|
||||||
if (f != NULL) fprintf(f, "--->");
|
|
||||||
|
|
||||||
+/* The subject before the match start. */
|
|
||||||
+
|
|
||||||
PCHARS(pre_start, cb->subject, 0, cb->start_match, utf, f);
|
|
||||||
|
|
||||||
+/* If a lookbehind is involved, the current position may be earlier than the
|
|
||||||
+match start. If so, use the match start instead. */
|
|
||||||
+
|
|
||||||
+current_position = (cb->current_position >= cb->start_match)?
|
|
||||||
+ cb->current_position : cb->start_match;
|
|
||||||
+
|
|
||||||
+/* The subject between the match start and the current position. */
|
|
||||||
+
|
|
||||||
PCHARS(post_start, cb->subject, cb->start_match,
|
|
||||||
- cb->current_position - cb->start_match, utf, f);
|
|
||||||
+ current_position - cb->start_match, utf, f);
|
|
||||||
|
|
||||||
-PCHARS(subject_length, cb->subject, 0, cb->subject_length, utf, NULL);
|
|
||||||
+/* Print from the current position to the end. */
|
|
||||||
+
|
|
||||||
+PCHARSV(cb->subject, current_position, cb->subject_length - current_position,
|
|
||||||
+ utf, f);
|
|
||||||
|
|
||||||
-PCHARSV(cb->subject, cb->current_position,
|
|
||||||
- cb->subject_length - cb->current_position, utf, f);
|
|
||||||
+/* Calculate the total subject printed length (no print). */
|
|
||||||
+
|
|
||||||
+PCHARS(subject_length, cb->subject, 0, cb->subject_length, utf, NULL);
|
|
||||||
|
|
||||||
if (f != NULL) fprintf(f, "\n");
|
|
||||||
|
|
||||||
@@ -7021,7 +7039,7 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
|
|
||||||
struct rlimit rlim;
|
|
||||||
if (U32OVERFLOW(uli))
|
|
||||||
{
|
|
||||||
- fprintf(stderr, "+++ Argument for -S is too big\n");
|
|
||||||
+ fprintf(stderr, "** Argument for -S is too big\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
stack_size = (uint32_t)uli;
|
|
||||||
@@ -7073,7 +7091,7 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
|
|
||||||
{
|
|
||||||
if (U32OVERFLOW(uli))
|
|
||||||
{
|
|
||||||
- fprintf(stderr, "+++ Argument for %s is too big\n", arg);
|
|
||||||
+ fprintf(stderr, "** Argument for %s is too big\n", arg);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
timeitm = (int)uli;
|
|
||||||
diff --git a/testdata/testinput2 b/testdata/testinput2
|
|
||||||
index 86c149d..67c40ba 100644
|
|
||||||
--- a/testdata/testinput2
|
|
||||||
+++ b/testdata/testinput2
|
|
||||||
@@ -4802,4 +4802,9 @@ a)"xI
|
|
||||||
|
|
||||||
/(?J)(?'a'))(?'a')/
|
|
||||||
|
|
||||||
+/(?<=((?C)0))/
|
|
||||||
+ 9010
|
|
||||||
+\= Expect no match
|
|
||||||
+ abc
|
|
||||||
+
|
|
||||||
# End of testinput2
|
|
||||||
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
|
||||||
index 87c7204..32aa066 100644
|
|
||||||
--- a/testdata/testoutput2
|
|
||||||
+++ b/testdata/testoutput2
|
|
||||||
@@ -15161,4 +15161,19 @@ MK: A\x00b
|
|
||||||
/(?J)(?'a'))(?'a')/
|
|
||||||
Failed: error 122 at offset 10: unmatched closing parenthesis
|
|
||||||
|
|
||||||
+/(?<=((?C)0))/
|
|
||||||
+ 9010
|
|
||||||
+--->9010
|
|
||||||
+ 0 ^ 0
|
|
||||||
+ 0 ^ 0
|
|
||||||
+ 0:
|
|
||||||
+ 1: 0
|
|
||||||
+\= Expect no match
|
|
||||||
+ abc
|
|
||||||
+--->abc
|
|
||||||
+ 0 ^ 0
|
|
||||||
+ 0 ^ 0
|
|
||||||
+ 0 ^ 0
|
|
||||||
+No match
|
|
||||||
+
|
|
||||||
# End of testinput2
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From f6cb85bcdb508b0aaf8bc6d99b1d23afd7f3a6a9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Sun, 28 Feb 2016 14:56:50 +0000
|
|
||||||
Subject: [PATCH] Fix typo in pcre2_study().
|
|
||||||
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@500 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Petr Písař: Ported to 10.21.
|
|
||||||
|
|
||||||
diff --git a/src/pcre2_study.c b/src/pcre2_study.c
|
|
||||||
index 18932ad..db08266 100644
|
|
||||||
--- a/src/pcre2_study.c
|
|
||||||
+++ b/src/pcre2_study.c
|
|
||||||
@@ -1452,7 +1452,7 @@ do
|
|
||||||
for (c = 0; c < 16; c++) re->start_bitmap[c] |= classmap[c];
|
|
||||||
for (c = 128; c < 256; c++)
|
|
||||||
{
|
|
||||||
- if ((classmap[c/8] && (1 << (c&7))) != 0)
|
|
||||||
+ if ((classmap[c/8] & (1 << (c&7))) != 0)
|
|
||||||
{
|
|
||||||
int d = (c >> 6) | 0xc0; /* Set bit for this starter */
|
|
||||||
re->start_bitmap[d/8] |= (1 << (d&7)); /* and then skip on to the */
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From f4778a47d6d454b71d227d359e874757b7ad1819 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Wed, 25 May 2016 08:42:31 +0000
|
|
||||||
Subject: [PATCH] Fix typo in test program.
|
|
||||||
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@518 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Petr Písař: Ported to 10.21.
|
|
||||||
|
|
||||||
diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c
|
|
||||||
index aaff07d..dfe0032 100644
|
|
||||||
--- a/src/pcre2_jit_test.c
|
|
||||||
+++ b/src/pcre2_jit_test.c
|
|
||||||
@@ -1532,10 +1532,10 @@ static int regression_tests(void)
|
|
||||||
is_successful = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
-#if defined SUPPORT_PCRE2_16 && defined SUPPORT_PCRE2_16
|
|
||||||
- if (ovector16_1[i] != ovector16_2[i] || ovector16_1[i] != ovector16_1[i] || ovector16_1[i] != ovector16_2[i]) {
|
|
||||||
- printf("\n16 and 16 bit: Ovector[%d] value differs(J16:%d,I16:%d,J32:%d,I32:%d): [%d] '%s' @ '%s' \n",
|
|
||||||
- i, ovector16_1[i], ovector16_2[i], ovector16_1[i], ovector16_2[i],
|
|
||||||
+#if defined SUPPORT_PCRE2_16 && defined SUPPORT_PCRE2_32
|
|
||||||
+ if (ovector16_1[i] != ovector16_2[i] || ovector16_1[i] != ovector32_1[i] || ovector16_1[i] != ovector32_2[i]) {
|
|
||||||
+ printf("\n16 and 32 bit: Ovector[%d] value differs(J16:%d,I16:%d,J32:%d,I32:%d): [%d] '%s' @ '%s' \n",
|
|
||||||
+ i, ovector16_1[i], ovector16_2[i], ovector32_1[i], ovector32_2[i],
|
|
||||||
total, current->pattern, current->input);
|
|
||||||
is_successful = 0;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.5.5
|
|
||||||
|
|
@ -1,152 +0,0 @@
|
|||||||
From a7d81bb826ca2aa2c46e3297112589cccab359b3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Wed, 10 Feb 2016 18:24:02 +0000
|
|
||||||
Subject: [PATCH] Fix workspace overflow for deep nested parentheses with
|
|
||||||
(*ACCEPT).
|
|
||||||
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@489 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Petr Písař: Ported to 10.21.
|
|
||||||
|
|
||||||
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
|
|
||||||
index e33d620..887fbfd 100644
|
|
||||||
--- a/src/pcre2_compile.c
|
|
||||||
+++ b/src/pcre2_compile.c
|
|
||||||
@@ -5901,10 +5901,22 @@ for (;; ptr++)
|
|
||||||
goto FAILED;
|
|
||||||
}
|
|
||||||
cb->had_accept = TRUE;
|
|
||||||
+
|
|
||||||
+ /* In the first pass, just accumulate the length required;
|
|
||||||
+ otherwise hitting (*ACCEPT) inside many nested parentheses can
|
|
||||||
+ cause workspace overflow. */
|
|
||||||
+
|
|
||||||
for (oc = cb->open_caps; oc != NULL; oc = oc->next)
|
|
||||||
{
|
|
||||||
- *code++ = OP_CLOSE;
|
|
||||||
- PUT2INC(code, 0, oc->number);
|
|
||||||
+ if (lengthptr != NULL)
|
|
||||||
+ {
|
|
||||||
+ *lengthptr += CU2BYTES(1) + IMM2_SIZE;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ *code++ = OP_CLOSE;
|
|
||||||
+ PUT2INC(code, 0, oc->number);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
setverb = *code++ =
|
|
||||||
(cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
|
|
||||||
diff --git a/testdata/testinput8 b/testdata/testinput8
|
|
||||||
index ca3b1b9..7e2a1f0 100644
|
|
||||||
--- a/testdata/testinput8
|
|
||||||
+++ b/testdata/testinput8
|
|
||||||
@@ -182,4 +182,6 @@
|
|
||||||
|
|
||||||
/((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-16-2 b/testdata/testoutput8-16-2
|
|
||||||
index 05669bb..a5e8dec 100644
|
|
||||||
--- a/testdata/testoutput8-16-2
|
|
||||||
+++ b/testdata/testoutput8-16-2
|
|
||||||
@@ -1027,4 +1027,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 186 at offset 490: regular expression is too complicated
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-16-3 b/testdata/testoutput8-16-3
|
|
||||||
index 31884e1..36133b3 100644
|
|
||||||
--- a/testdata/testoutput8-16-3
|
|
||||||
+++ b/testdata/testoutput8-16-3
|
|
||||||
@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 114 at offset 509: missing closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-32-2 b/testdata/testoutput8-32-2
|
|
||||||
index babd0c7..99c4fad 100644
|
|
||||||
--- a/testdata/testoutput8-32-2
|
|
||||||
+++ b/testdata/testoutput8-32-2
|
|
||||||
@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 114 at offset 509: missing closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-32-3 b/testdata/testoutput8-32-3
|
|
||||||
index babd0c7..99c4fad 100644
|
|
||||||
--- a/testdata/testoutput8-32-3
|
|
||||||
+++ b/testdata/testoutput8-32-3
|
|
||||||
@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 114 at offset 509: missing closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-32-4 b/testdata/testoutput8-32-4
|
|
||||||
index babd0c7..99c4fad 100644
|
|
||||||
--- a/testdata/testoutput8-32-4
|
|
||||||
+++ b/testdata/testoutput8-32-4
|
|
||||||
@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 114 at offset 509: missing closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-8-2 b/testdata/testoutput8-8-2
|
|
||||||
index 6a9aa0a..6dc1f42 100644
|
|
||||||
--- a/testdata/testoutput8-8-2
|
|
||||||
+++ b/testdata/testoutput8-8-2
|
|
||||||
@@ -1026,4 +1026,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 114 at offset 509: missing closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-8-3 b/testdata/testoutput8-8-3
|
|
||||||
index 2fe1168..ae14946 100644
|
|
||||||
--- a/testdata/testoutput8-8-3
|
|
||||||
+++ b/testdata/testoutput8-8-3
|
|
||||||
@@ -1024,4 +1024,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 114 at offset 509: missing closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
diff --git a/testdata/testoutput8-8-4 b/testdata/testoutput8-8-4
|
|
||||||
index 91993b2..6c79956 100644
|
|
||||||
--- a/testdata/testoutput8-8-4
|
|
||||||
+++ b/testdata/testoutput8-8-4
|
|
||||||
@@ -1022,4 +1022,7 @@ Capturing subpattern count = 10
|
|
||||||
May match empty string
|
|
||||||
Subject length lower bound = 0
|
|
||||||
|
|
||||||
+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
|
|
||||||
+Failed: error 114 at offset 509: missing closing parenthesis
|
|
||||||
+
|
|
||||||
# End of testinput8
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
From c3e3345d205607532c739b38acbc100623cd512a Mon Sep 17 00:00:00 2001
|
|
||||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
|
||||||
Date: Tue, 31 May 2016 11:06:53 +0000
|
|
||||||
Subject: [PATCH] Make pcre2grep use JIT (it was omitted by mistake).
|
|
||||||
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@519 6239d852-aaf2-0410-a92c-79f79f948069
|
|
||||||
|
|
||||||
Petr Písař: Ported to 10.21.
|
|
||||||
|
|
||||||
diff --git a/src/pcre2grep.c b/src/pcre2grep.c
|
|
||||||
index 47d2a4e..60b6812 100644
|
|
||||||
--- a/src/pcre2grep.c
|
|
||||||
+++ b/src/pcre2grep.c
|
|
||||||
@@ -2788,9 +2788,24 @@ if ((popts & PO_FIXED_STRINGS) != 0)
|
|
||||||
sprintf((char *)buffer, "%s%.*s%s", prefix[popts], patlen, ps, suffix[popts]);
|
|
||||||
p->compiled = pcre2_compile(buffer, -1, options, &errcode, &erroffset,
|
|
||||||
compile_context);
|
|
||||||
-if (p->compiled != NULL) return TRUE;
|
|
||||||
+
|
|
||||||
+/* Handle successful compile */
|
|
||||||
+
|
|
||||||
+if (p->compiled != NULL)
|
|
||||||
+ {
|
|
||||||
+#ifdef SUPPORT_PCRE2GREP_JIT
|
|
||||||
+ if (use_jit)
|
|
||||||
+ {
|
|
||||||
+ errcode = pcre2_jit_compile(p->compiled, PCRE2_JIT_COMPLETE);
|
|
||||||
+ if (errcode == 0) return TRUE;
|
|
||||||
+ erroffset = PCRE2_SIZE_MAX; /* Will get reduced to patlen below */
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+#endif
|
|
||||||
+ return TRUE;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
-/* Handle compile errors */
|
|
||||||
+/* Handle compile and JIT compile errors */
|
|
||||||
|
|
||||||
erroffset -= (int)strlen(prefix[popts]);
|
|
||||||
if (erroffset > patlen) erroffset = patlen;
|
|
||||||
--
|
|
||||||
2.5.5
|
|
||||||
|
|
44
pcre2.spec
44
pcre2.spec
@ -1,8 +1,8 @@
|
|||||||
# This is stable release:
|
# This is stable release:
|
||||||
#%%global rcversion RC1
|
%global rcversion RC1
|
||||||
Name: pcre2
|
Name: pcre2
|
||||||
Version: 10.21
|
Version: 10.22
|
||||||
Release: %{?rcversion:0.}6%{?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
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -12,6 +12,7 @@ Group: System Environment/Libraries
|
|||||||
# LICENSE: BSD text and declares Public Domain
|
# LICENSE: BSD text and declares Public Domain
|
||||||
# for testdata
|
# for testdata
|
||||||
#Not distributed in binary package
|
#Not distributed in binary package
|
||||||
|
# ar-lib: GPLv2+ with exception
|
||||||
# autotools: GPLv3+ with exception
|
# autotools: GPLv3+ with exception
|
||||||
# install-sh: MIT
|
# install-sh: MIT
|
||||||
# testdata: Public Domain
|
# testdata: Public Domain
|
||||||
@ -20,29 +21,6 @@ URL: http://www.pcre.org/
|
|||||||
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2
|
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2
|
||||||
# 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
|
||||||
# Report unmatched closing parantheses properly, in upstream after 10.21
|
|
||||||
Patch1: pcre2-10.21-Detect-unmatched-closing-parentheses-in-the-pre-scan.patch
|
|
||||||
# Fix pcre2test for expressions with a callout inside a look-behind assertion,
|
|
||||||
# upstream bug #1783, fixed in upstream after 10.21
|
|
||||||
Patch2: pcre2-10.21-Fix-pcre2test-loop-when-a-callout-is-in-an-initial-l.patch
|
|
||||||
# Fix CVE-2016-3191 (workspace overflow for (*ACCEPT) with deeply nested
|
|
||||||
# parentheses), upstream bug #1791, fixed in upstream after 10.21
|
|
||||||
Patch3: pcre2-10.21-Fix-workspace-overflow-for-deep-nested-parentheses-w.patch
|
|
||||||
# Fix a typo in pcre2_study(), fixed in upstream after 10.21
|
|
||||||
Patch4: pcre2-10.21-Fix-typo-in-pcre2_study.patch
|
|
||||||
# Fix a race in JIT locking condition, fixed in upstream after 10.21
|
|
||||||
Patch5: pcre2-10.21-A-racing-condition-is-fixed-in-JIT-reported-by-Mozil.patch
|
|
||||||
# Fix an ovector check in JIT test program, fixed in upstream after 10.21
|
|
||||||
Patch6: pcre2-10.21-Fix-typo-in-test-program.patch
|
|
||||||
# Enable JIT in the pcre2grep tool, fixed in upstream after 10.21
|
|
||||||
Patch7: pcre2-10.21-Make-pcre2grep-use-JIT-it-was-omitted-by-mistake.patch
|
|
||||||
# Fix repeated pcregrep output if -o with -M options were used and the match
|
|
||||||
# extended over a line boundary, upstream bug #1848, fixed in upstream after
|
|
||||||
# 10.21
|
|
||||||
Patch8: pcre2-10.21-Fix-bad-interaction-between-o-and-M-in-pcre2grep.patch
|
|
||||||
# Documentation for Fix-bad-interaction-between-o-and-M-in-pcre2grep.patch,
|
|
||||||
# upstream bug #1848, fixed in upstream after 10.21
|
|
||||||
Patch9: pcre2-10.21-Documentation-clarification.patch
|
|
||||||
|
|
||||||
# New libtool to get rid of RPATH and to use distribution autotools
|
# New libtool to get rid of RPATH and to use distribution autotools
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -121,15 +99,6 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
|||||||
%prep
|
%prep
|
||||||
%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
|
|
||||||
# Because of multilib patch
|
# Because of multilib patch
|
||||||
libtoolize --copy --force
|
libtoolize --copy --force
|
||||||
autoreconf -vif
|
autoreconf -vif
|
||||||
@ -157,6 +126,7 @@ autoreconf -vif
|
|||||||
--enable-pcre2-32 \
|
--enable-pcre2-32 \
|
||||||
--disable-pcre2test-libedit \
|
--disable-pcre2test-libedit \
|
||||||
--enable-pcre2test-libreadline \
|
--enable-pcre2test-libreadline \
|
||||||
|
--enable-pcre2grep-callout \
|
||||||
--disable-pcre2grep-libbz2 \
|
--disable-pcre2grep-libbz2 \
|
||||||
--disable-pcre2grep-libz \
|
--disable-pcre2grep-libz \
|
||||||
--disable-rebuild-chartables \
|
--disable-rebuild-chartables \
|
||||||
@ -225,6 +195,10 @@ make %{?_smp_mflags} check VERBOSE=yes
|
|||||||
%{_mandir}/man1/pcre2test.*
|
%{_mandir}/man1/pcre2test.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 30 2016 Petr Pisar <ppisar@redhat.com> - 10.22-0.1.RC1
|
||||||
|
- 10.22-RC1 bump
|
||||||
|
- libpcre2-posix library changed ABI (FIXME: Bump SONAME)
|
||||||
|
|
||||||
* Mon Jun 20 2016 Petr Pisar <ppisar@redhat.com> - 10.21-6
|
* 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
|
- Fix repeated pcregrep output if -o with -M options were used and the match
|
||||||
extended over a line boundary (upstream bug #1848)
|
extended over a line boundary (upstream bug #1848)
|
||||||
|
Loading…
Reference in New Issue
Block a user