8.40-RC1 bump
This commit is contained in:
parent
acfd08086a
commit
4949309617
.gitignorepcre-8.39-Document-assertion-capture-limitation.patchpcre-8.39-Fix-bad-conditional-recursion-test-bug-when-a-group-.patchpcre-8.39-Fix-bad-interaction-between-o-and-M-in-pcregrep.patchpcre-8.39-Fix-character-class-bug-when-a-Unicode-property-was-.patchpcre-8.39-Fix-documentation-error.patchpcre-8.39-Fix-optimization-bugs-for-patterns-starting-with-loo.patchpcre-8.39-Fix-pcretest-callout-display-bug.patchpcre-8.39-Fix-register-overwite-in-JIT-when-SSE2-acceleration-.patchpcre-8.39-Fix-typos-in-documentation.patchpcre.specsources
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,3 +26,4 @@ pcre-8.10.tar.bz2
|
||||
/pcre-8.38.tar.bz2
|
||||
/pcre-8.39-RC1.tar.bz2
|
||||
/pcre-8.39.tar.bz2
|
||||
/pcre-8.40-RC1.tar.bz2
|
||||
|
@ -1,49 +0,0 @@
|
||||
From ee124b6b235a560fc5bfc18cc27e280af7e021d2 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Sun, 23 Oct 2016 15:44:15 +0000
|
||||
Subject: [PATCH] Document assertion capture limitation.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1671 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
doc/pcrepattern.3 | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
|
||||
index 1e25371..c221682 100644
|
||||
--- a/doc/pcrepattern.3
|
||||
+++ b/doc/pcrepattern.3
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH PCREPATTERN 3 "14 October 2016" "PCRE 8.40"
|
||||
+.TH PCREPATTERN 3 "23 October 2016" "PCRE 8.40"
|
||||
.SH NAME
|
||||
PCRE - Perl-compatible regular expressions
|
||||
.SH "PCRE REGULAR EXPRESSION DETAILS"
|
||||
@@ -2167,6 +2167,13 @@ numbering the capturing subpatterns in the whole pattern. However, substring
|
||||
capturing is carried out only for positive assertions. (Perl sometimes, but not
|
||||
always, does do capturing in negative assertions.)
|
||||
.P
|
||||
+WARNING: If a positive assertion containing one or more capturing subpatterns
|
||||
+succeeds, but failure to match later in the pattern causes backtracking over
|
||||
+this assertion, the captures within the assertion are reset only if no higher
|
||||
+numbered captures are already set. This is, unfortunately, a fundamental
|
||||
+limitation of the current implementation, and as PCRE1 is now in
|
||||
+maintenance-only status, it is unlikely ever to change.
|
||||
+.P
|
||||
For compatibility with Perl, assertion subpatterns may be repeated; though
|
||||
it makes no sense to assert the same thing several times, the side effect of
|
||||
capturing parentheses may occasionally be useful. In practice, there only three
|
||||
@@ -3292,6 +3299,6 @@ Cambridge CB2 3QH, England.
|
||||
.rs
|
||||
.sp
|
||||
.nf
|
||||
-Last updated: 14 October 2016
|
||||
+Last updated: 23 October 2016
|
||||
Copyright (c) 1997-2016 University of Cambridge.
|
||||
.fi
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,80 +0,0 @@
|
||||
From a2d87770aebc2ba13d6943ff1fcfae0fc26a3134 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Thu, 13 Oct 2016 16:00:48 +0000
|
||||
Subject: [PATCH] Fix bad conditional recursion test bug when a group with name
|
||||
starting "R" exists.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1667 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
|
||||
Petr Písař: Ported to 8.39.
|
||||
|
||||
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||
index fb80ed1..67c74e8 100644
|
||||
--- a/pcre_compile.c
|
||||
+++ b/pcre_compile.c
|
||||
@@ -6951,7 +6951,8 @@ for (;; ptr++)
|
||||
slot = cd->name_table;
|
||||
for (i = 0; i < cd->names_found; i++)
|
||||
{
|
||||
- if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0) break;
|
||||
+ if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0 &&
|
||||
+ slot[IMM2_SIZE+namelen] == 0) break;
|
||||
slot += cd->name_entry_size;
|
||||
}
|
||||
|
||||
diff --git a/testdata/testinput2 b/testdata/testinput2
|
||||
index 75e402e..38346ef 100644
|
||||
--- a/testdata/testinput2
|
||||
+++ b/testdata/testinput2
|
||||
@@ -4243,4 +4243,8 @@ backtracking verbs. --/
|
||||
|
||||
/\N(?(?C)0?!.)*/
|
||||
|
||||
+/(?<RA>abc)(?(R)xyz)/BZ
|
||||
+
|
||||
+/(?<R>abc)(?(R)xyz)/BZ
|
||||
+
|
||||
/-- End of testinput2 --/
|
||||
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
||||
index 5e88d1a..216bff8 100644
|
||||
--- a/testdata/testoutput2
|
||||
+++ b/testdata/testoutput2
|
||||
@@ -14670,4 +14670,32 @@ No match
|
||||
/\N(?(?C)0?!.)*/
|
||||
Failed: assertion expected after (?( or (?(?C) at offset 4
|
||||
|
||||
+/(?<RA>abc)(?(R)xyz)/BZ
|
||||
+------------------------------------------------------------------
|
||||
+ Bra
|
||||
+ CBra 1
|
||||
+ abc
|
||||
+ Ket
|
||||
+ Cond
|
||||
+ Cond recurse any
|
||||
+ xyz
|
||||
+ Ket
|
||||
+ Ket
|
||||
+ End
|
||||
+------------------------------------------------------------------
|
||||
+
|
||||
+/(?<R>abc)(?(R)xyz)/BZ
|
||||
+------------------------------------------------------------------
|
||||
+ Bra
|
||||
+ CBra 1
|
||||
+ abc
|
||||
+ Ket
|
||||
+ Cond
|
||||
+ 1 Cond ref
|
||||
+ xyz
|
||||
+ Ket
|
||||
+ Ket
|
||||
+ End
|
||||
+------------------------------------------------------------------
|
||||
+
|
||||
/-- End of testinput2 --/
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,33 +0,0 @@
|
||||
From 664df44c7eb62edbce95ab6dbdedcba7f07fed02 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Fri, 17 Jun 2016 17:28:14 +0000
|
||||
Subject: [PATCH] Fix bad interaction between -o and -M in pcregrep.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1658 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
|
||||
Petr Písař <ppisar@redhat.com>: Ported to 8.39.
|
||||
|
||||
|
||||
diff --git a/pcregrep.c b/pcregrep.c
|
||||
index cd53c64..fd2a676 100644
|
||||
--- a/pcregrep.c
|
||||
+++ b/pcregrep.c
|
||||
@@ -1803,6 +1803,12 @@ while (ptr < endptr)
|
||||
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 ((unsigned int)offsets[1] > linelength) goto END_ONE_MATCH;
|
||||
+
|
||||
startoffset = offsets[1]; /* Restart after the match */
|
||||
if (startoffset <= oldstartoffset)
|
||||
{
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,269 +0,0 @@
|
||||
From 1767e8be04f300ad10f2b358c281a23f0759e3d3 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Thu, 4 Aug 2016 17:15:38 +0000
|
||||
Subject: [PATCH] Fix character class bug when a Unicode property was present
|
||||
with \D etc in a non-ucp character class in a wide character mode.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1664 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
|
||||
Petr Písař: Ported to 8.39.
|
||||
|
||||
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||
index 7cd3950..fb80ed1 100644
|
||||
--- a/pcre_compile.c
|
||||
+++ b/pcre_compile.c
|
||||
@@ -5579,6 +5579,34 @@ for (;; ptr++)
|
||||
#endif
|
||||
#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
|
||||
{
|
||||
+ /* For non-UCP wide characters, in a non-negative class containing \S or
|
||||
+ similar (should_flip_negation is set), all characters greater than 255
|
||||
+ must be in the class. */
|
||||
+
|
||||
+ if (
|
||||
+#if defined COMPILE_PCRE8
|
||||
+ utf &&
|
||||
+#endif
|
||||
+ should_flip_negation && !negate_class && (options & PCRE_UCP) == 0)
|
||||
+ {
|
||||
+ *class_uchardata++ = XCL_RANGE;
|
||||
+ if (utf) /* Will always be utf in the 8-bit library */
|
||||
+ {
|
||||
+ class_uchardata += PRIV(ord2utf)(0x100, class_uchardata);
|
||||
+ class_uchardata += PRIV(ord2utf)(0x10ffff, class_uchardata);
|
||||
+ }
|
||||
+ else /* Can only happen for the 16-bit & 32-bit libraries */
|
||||
+ {
|
||||
+#if defined COMPILE_PCRE16
|
||||
+ *class_uchardata++ = 0x100;
|
||||
+ *class_uchardata++ = 0xffffu;
|
||||
+#elif defined COMPILE_PCRE32
|
||||
+ *class_uchardata++ = 0x100;
|
||||
+ *class_uchardata++ = 0xffffffffu;
|
||||
+#endif
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
*class_uchardata++ = XCL_END; /* Marks the end of extra data */
|
||||
*code++ = OP_XCLASS;
|
||||
code += LINK_SIZE;
|
||||
diff --git a/testdata/testinput16 b/testdata/testinput16
|
||||
index 15419e6..7ccde0a 100644
|
||||
--- a/testdata/testinput16
|
||||
+++ b/testdata/testinput16
|
||||
@@ -38,4 +38,30 @@
|
||||
/s+/i8SI
|
||||
SSss\x{17f}
|
||||
|
||||
+/[\W\p{Any}]/BZ
|
||||
+ abc
|
||||
+ 123
|
||||
+
|
||||
+/[\W\pL]/BZ
|
||||
+ abc
|
||||
+ ** Failers
|
||||
+ 123
|
||||
+
|
||||
+/[\D]/8
|
||||
+ \x{1d7cf}
|
||||
+
|
||||
+/[\D\P{Nd}]/8
|
||||
+ \x{1d7cf}
|
||||
+
|
||||
+/[^\D]/8
|
||||
+ a9b
|
||||
+ ** Failers
|
||||
+ \x{1d7cf}
|
||||
+
|
||||
+/[^\D\P{Nd}]/8
|
||||
+ a9b
|
||||
+ \x{1d7cf}
|
||||
+ ** Failers
|
||||
+ \x{10000}
|
||||
+
|
||||
/-- End of testinput16 --/
|
||||
diff --git a/testdata/testinput19 b/testdata/testinput19
|
||||
index ce45afc..dfe8c7b 100644
|
||||
--- a/testdata/testinput19
|
||||
+++ b/testdata/testinput19
|
||||
@@ -25,4 +25,21 @@
|
||||
/s+/i8SI
|
||||
SSss\x{17f}
|
||||
|
||||
+/[\D]/8
|
||||
+ \x{1d7cf}
|
||||
+
|
||||
+/[\D\P{Nd}]/8
|
||||
+ \x{1d7cf}
|
||||
+
|
||||
+/[^\D]/8
|
||||
+ a9b
|
||||
+ ** Failers
|
||||
+ \x{1d7cf}
|
||||
+
|
||||
+/[^\D\P{Nd}]/8
|
||||
+ a9b
|
||||
+ \x{1d7cf}
|
||||
+ ** Failers
|
||||
+ \x{10000}
|
||||
+
|
||||
/-- End of testinput19 --/
|
||||
diff --git a/testdata/testinput7 b/testdata/testinput7
|
||||
index 00b9738..f44a810 100644
|
||||
--- a/testdata/testinput7
|
||||
+++ b/testdata/testinput7
|
||||
@@ -838,15 +838,6 @@ of case for anything other than the ASCII letters. --/
|
||||
/^s?c/mi8I
|
||||
scat
|
||||
|
||||
-/[\W\p{Any}]/BZ
|
||||
- abc
|
||||
- 123
|
||||
-
|
||||
-/[\W\pL]/BZ
|
||||
- abc
|
||||
- ** Failers
|
||||
- 123
|
||||
-
|
||||
/a[[:punct:]b]/WBZ
|
||||
|
||||
/a[[:punct:]b]/8WBZ
|
||||
diff --git a/testdata/testoutput16 b/testdata/testoutput16
|
||||
index fd184cd..e6ba26a 100644
|
||||
--- a/testdata/testoutput16
|
||||
+++ b/testdata/testoutput16
|
||||
@@ -138,4 +138,56 @@ Starting chars: S s \xc5
|
||||
SSss\x{17f}
|
||||
0: SSss\x{17f}
|
||||
|
||||
+/[\W\p{Any}]/BZ
|
||||
+------------------------------------------------------------------
|
||||
+ Bra
|
||||
+ [\x00-/:-@[-^`{-\xff\p{Any}]
|
||||
+ Ket
|
||||
+ End
|
||||
+------------------------------------------------------------------
|
||||
+ abc
|
||||
+ 0: a
|
||||
+ 123
|
||||
+ 0: 1
|
||||
+
|
||||
+/[\W\pL]/BZ
|
||||
+------------------------------------------------------------------
|
||||
+ Bra
|
||||
+ [\x00-/:-@[-^`{-\xff\p{L}]
|
||||
+ Ket
|
||||
+ End
|
||||
+------------------------------------------------------------------
|
||||
+ abc
|
||||
+ 0: a
|
||||
+ ** Failers
|
||||
+ 0: *
|
||||
+ 123
|
||||
+No match
|
||||
+
|
||||
+/[\D]/8
|
||||
+ \x{1d7cf}
|
||||
+ 0: \x{1d7cf}
|
||||
+
|
||||
+/[\D\P{Nd}]/8
|
||||
+ \x{1d7cf}
|
||||
+ 0: \x{1d7cf}
|
||||
+
|
||||
+/[^\D]/8
|
||||
+ a9b
|
||||
+ 0: 9
|
||||
+ ** Failers
|
||||
+No match
|
||||
+ \x{1d7cf}
|
||||
+No match
|
||||
+
|
||||
+/[^\D\P{Nd}]/8
|
||||
+ a9b
|
||||
+ 0: 9
|
||||
+ \x{1d7cf}
|
||||
+ 0: \x{1d7cf}
|
||||
+ ** Failers
|
||||
+No match
|
||||
+ \x{10000}
|
||||
+No match
|
||||
+
|
||||
/-- End of testinput16 --/
|
||||
diff --git a/testdata/testoutput19 b/testdata/testoutput19
|
||||
index eb8a8f6..982bea4 100644
|
||||
--- a/testdata/testoutput19
|
||||
+++ b/testdata/testoutput19
|
||||
@@ -105,4 +105,30 @@ Starting chars: S s \xff
|
||||
SSss\x{17f}
|
||||
0: SSss\x{17f}
|
||||
|
||||
+/[\D]/8
|
||||
+ \x{1d7cf}
|
||||
+ 0: \x{1d7cf}
|
||||
+
|
||||
+/[\D\P{Nd}]/8
|
||||
+ \x{1d7cf}
|
||||
+ 0: \x{1d7cf}
|
||||
+
|
||||
+/[^\D]/8
|
||||
+ a9b
|
||||
+ 0: 9
|
||||
+ ** Failers
|
||||
+No match
|
||||
+ \x{1d7cf}
|
||||
+No match
|
||||
+
|
||||
+/[^\D\P{Nd}]/8
|
||||
+ a9b
|
||||
+ 0: 9
|
||||
+ \x{1d7cf}
|
||||
+ 0: \x{1d7cf}
|
||||
+ ** Failers
|
||||
+No match
|
||||
+ \x{10000}
|
||||
+No match
|
||||
+
|
||||
/-- End of testinput19 --/
|
||||
diff --git a/testdata/testoutput7 b/testdata/testoutput7
|
||||
index fdfff64..2b167b2 100644
|
||||
--- a/testdata/testoutput7
|
||||
+++ b/testdata/testoutput7
|
||||
@@ -2295,32 +2295,6 @@ Need char = 'c' (caseless)
|
||||
scat
|
||||
0: sc
|
||||
|
||||
-/[\W\p{Any}]/BZ
|
||||
-------------------------------------------------------------------
|
||||
- Bra
|
||||
- [\x00-/:-@[-^`{-\xff\p{Any}]
|
||||
- Ket
|
||||
- End
|
||||
-------------------------------------------------------------------
|
||||
- abc
|
||||
- 0: a
|
||||
- 123
|
||||
- 0: 1
|
||||
-
|
||||
-/[\W\pL]/BZ
|
||||
-------------------------------------------------------------------
|
||||
- Bra
|
||||
- [\x00-/:-@[-^`{-\xff\p{L}]
|
||||
- Ket
|
||||
- End
|
||||
-------------------------------------------------------------------
|
||||
- abc
|
||||
- 0: a
|
||||
- ** Failers
|
||||
- 0: *
|
||||
- 123
|
||||
-No match
|
||||
-
|
||||
/a[[:punct:]b]/WBZ
|
||||
------------------------------------------------------------------
|
||||
Bra
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,51 +0,0 @@
|
||||
From bad0d0347aa4ab37d2b3e906193725d68a5d98bf Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Fri, 14 Oct 2016 17:06:22 +0000
|
||||
Subject: [PATCH] Fix documentation error.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1668 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
doc/pcrepattern.3 | 14 +++++---------
|
||||
1 file changed, 5 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
|
||||
index 952451f..1e25371 100644
|
||||
--- a/doc/pcrepattern.3
|
||||
+++ b/doc/pcrepattern.3
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH PCREPATTERN 3 "14 June 2015" "PCRE 8.38"
|
||||
+.TH PCREPATTERN 3 "14 October 2016" "PCRE 8.40"
|
||||
.SH NAME
|
||||
PCRE - Perl-compatible regular expressions
|
||||
.SH "PCRE REGULAR EXPRESSION DETAILS"
|
||||
@@ -1511,12 +1511,8 @@ J, U and X respectively.
|
||||
.P
|
||||
When one of these option changes occurs at top level (that is, not inside
|
||||
subpattern parentheses), the change applies to the remainder of the pattern
|
||||
-that follows. If the change is placed right at the start of a pattern, PCRE
|
||||
-extracts it into the global options (and it will therefore show up in data
|
||||
-extracted by the \fBpcre_fullinfo()\fP function).
|
||||
-.P
|
||||
-An option change within a subpattern (see below for a description of
|
||||
-subpatterns) affects only that part of the subpattern that follows it, so
|
||||
+that follows. An option change within a subpattern (see below for a description
|
||||
+of subpatterns) affects only that part of the subpattern that follows it, so
|
||||
.sp
|
||||
(a(?i)b)c
|
||||
.sp
|
||||
@@ -3296,6 +3292,6 @@ Cambridge CB2 3QH, England.
|
||||
.rs
|
||||
.sp
|
||||
.nf
|
||||
-Last updated: 14 June 2015
|
||||
-Copyright (c) 1997-2015 University of Cambridge.
|
||||
+Last updated: 14 October 2016
|
||||
+Copyright (c) 1997-2016 University of Cambridge.
|
||||
.fi
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,242 +0,0 @@
|
||||
From d6d45d15235fc6f010cfb193db8fb672a152e41c Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Tue, 18 Oct 2016 15:10:09 +0000
|
||||
Subject: [PATCH] Fix optimization bugs for patterns starting with lookaheads.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1669 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
|
||||
Petr Písař: Ported to 8.39.
|
||||
|
||||
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||
index 67c74e8..de92313 100644
|
||||
--- a/pcre_compile.c
|
||||
+++ b/pcre_compile.c
|
||||
@@ -7918,15 +7918,17 @@ for (;; ptr++)
|
||||
}
|
||||
}
|
||||
|
||||
- /* For a forward assertion, we take the reqchar, if set. This can be
|
||||
- helpful if the pattern that follows the assertion doesn't set a different
|
||||
- char. For example, it's useful for /(?=abcde).+/. We can't set firstchar
|
||||
- for an assertion, however because it leads to incorrect effect for patterns
|
||||
- such as /(?=a)a.+/ when the "real" "a" would then become a reqchar instead
|
||||
- of a firstchar. This is overcome by a scan at the end if there's no
|
||||
- firstchar, looking for an asserted first char. */
|
||||
-
|
||||
- else if (bravalue == OP_ASSERT && subreqcharflags >= 0)
|
||||
+ /* For a forward assertion, we take the reqchar, if set, provided that the
|
||||
+ group has also set a first char. This can be helpful if the pattern that
|
||||
+ follows the assertion doesn't set a different char. For example, it's
|
||||
+ useful for /(?=abcde).+/. We can't set firstchar for an assertion, however
|
||||
+ because it leads to incorrect effect for patterns such as /(?=a)a.+/ when
|
||||
+ the "real" "a" would then become a reqchar instead of a firstchar. This is
|
||||
+ overcome by a scan at the end if there's no firstchar, looking for an
|
||||
+ asserted first char. */
|
||||
+
|
||||
+ else if (bravalue == OP_ASSERT && subreqcharflags >= 0 &&
|
||||
+ subfirstcharflags >= 0)
|
||||
{
|
||||
reqchar = subreqchar;
|
||||
reqcharflags = subreqcharflags;
|
||||
@@ -8715,8 +8717,8 @@ matching and for non-DOTALL patterns that start with .* (which must start at
|
||||
the beginning or after \n). As in the case of is_anchored() (see above), we
|
||||
have to take account of back references to capturing brackets that contain .*
|
||||
because in that case we can't make the assumption. Also, the appearance of .*
|
||||
-inside atomic brackets or in a pattern that contains *PRUNE or *SKIP does not
|
||||
-count, because once again the assumption no longer holds.
|
||||
+inside atomic brackets or in an assertion, or in a pattern that contains *PRUNE
|
||||
+or *SKIP does not count, because once again the assumption no longer holds.
|
||||
|
||||
Arguments:
|
||||
code points to start of expression (the bracket)
|
||||
@@ -8725,13 +8727,14 @@ Arguments:
|
||||
the less precise approach
|
||||
cd points to the compile data
|
||||
atomcount atomic group level
|
||||
+ inassert TRUE if in an assertion
|
||||
|
||||
Returns: TRUE or FALSE
|
||||
*/
|
||||
|
||||
static BOOL
|
||||
is_startline(const pcre_uchar *code, unsigned int bracket_map,
|
||||
- compile_data *cd, int atomcount)
|
||||
+ compile_data *cd, int atomcount, BOOL inassert)
|
||||
{
|
||||
do {
|
||||
const pcre_uchar *scode = first_significant_code(
|
||||
@@ -8758,7 +8761,7 @@ do {
|
||||
return FALSE;
|
||||
|
||||
default: /* Assertion */
|
||||
- if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
|
||||
+ if (!is_startline(scode, bracket_map, cd, atomcount, TRUE)) return FALSE;
|
||||
do scode += GET(scode, 1); while (*scode == OP_ALT);
|
||||
scode += 1 + LINK_SIZE;
|
||||
break;
|
||||
@@ -8772,7 +8775,7 @@ do {
|
||||
if (op == OP_BRA || op == OP_BRAPOS ||
|
||||
op == OP_SBRA || op == OP_SBRAPOS)
|
||||
{
|
||||
- if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
|
||||
+ if (!is_startline(scode, bracket_map, cd, atomcount, inassert)) return FALSE;
|
||||
}
|
||||
|
||||
/* Capturing brackets */
|
||||
@@ -8782,33 +8785,33 @@ do {
|
||||
{
|
||||
int n = GET2(scode, 1+LINK_SIZE);
|
||||
int new_map = bracket_map | ((n < 32)? (1 << n) : 1);
|
||||
- if (!is_startline(scode, new_map, cd, atomcount)) return FALSE;
|
||||
+ if (!is_startline(scode, new_map, cd, atomcount, inassert)) return FALSE;
|
||||
}
|
||||
|
||||
/* Positive forward assertions */
|
||||
|
||||
else if (op == OP_ASSERT)
|
||||
{
|
||||
- if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
|
||||
+ if (!is_startline(scode, bracket_map, cd, atomcount, TRUE)) return FALSE;
|
||||
}
|
||||
|
||||
/* Atomic brackets */
|
||||
|
||||
else if (op == OP_ONCE || op == OP_ONCE_NC)
|
||||
{
|
||||
- if (!is_startline(scode, bracket_map, cd, atomcount + 1)) return FALSE;
|
||||
+ if (!is_startline(scode, bracket_map, cd, atomcount + 1, inassert)) return FALSE;
|
||||
}
|
||||
|
||||
/* .* means "start at start or after \n" if it isn't in atomic brackets or
|
||||
- brackets that may be referenced, as long as the pattern does not contain
|
||||
- *PRUNE or *SKIP, because these break the feature. Consider, for example,
|
||||
- /.*?a(*PRUNE)b/ with the subject "aab", which matches "ab", i.e. not at the
|
||||
- start of a line. */
|
||||
+ brackets that may be referenced or an assertion, as long as the pattern does
|
||||
+ not contain *PRUNE or *SKIP, because these break the feature. Consider, for
|
||||
+ example, /.*?a(*PRUNE)b/ with the subject "aab", which matches "ab", i.e.
|
||||
+ not at the start of a line. */
|
||||
|
||||
else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR || op == OP_TYPEPOSSTAR)
|
||||
{
|
||||
if (scode[1] != OP_ANY || (bracket_map & cd->backref_map) != 0 ||
|
||||
- atomcount > 0 || cd->had_pruneorskip)
|
||||
+ atomcount > 0 || cd->had_pruneorskip || inassert)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -9663,7 +9666,7 @@ if ((re->options & PCRE_ANCHORED) == 0)
|
||||
re->flags |= PCRE_FIRSTSET;
|
||||
}
|
||||
|
||||
- else if (is_startline(codestart, 0, cd, 0)) re->flags |= PCRE_STARTLINE;
|
||||
+ else if (is_startline(codestart, 0, cd, 0, FALSE)) re->flags |= PCRE_STARTLINE;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/testdata/testinput1 b/testdata/testinput1
|
||||
index 8379ce0..93abab3 100644
|
||||
--- a/testdata/testinput1
|
||||
+++ b/testdata/testinput1
|
||||
@@ -5733,4 +5733,10 @@ AbcdCBefgBhiBqz
|
||||
"(?|(\k'Pm')|(?'Pm'))"
|
||||
abcd
|
||||
|
||||
+/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[,;:])(?=.{8,16})(?!.*[\s])/
|
||||
+ \ Fred:099
|
||||
+
|
||||
+/(?=.*X)X$/
|
||||
+ \ X
|
||||
+
|
||||
/-- End of testinput1 --/
|
||||
diff --git a/testdata/testinput2 b/testdata/testinput2
|
||||
index 38346ef..08c6f39 100644
|
||||
--- a/testdata/testinput2
|
||||
+++ b/testdata/testinput2
|
||||
@@ -4247,4 +4247,6 @@ backtracking verbs. --/
|
||||
|
||||
/(?<R>abc)(?(R)xyz)/BZ
|
||||
|
||||
+/(?=.*[A-Z])/I
|
||||
+
|
||||
/-- End of testinput2 --/
|
||||
diff --git a/testdata/testinput6 b/testdata/testinput6
|
||||
index a178d3d..22ed1e6 100644
|
||||
--- a/testdata/testinput6
|
||||
+++ b/testdata/testinput6
|
||||
@@ -1562,4 +1562,10 @@
|
||||
\x{389}
|
||||
\x{20ac}
|
||||
|
||||
+/(?=.*b)\pL/
|
||||
+ 11bb
|
||||
+
|
||||
+/(?(?=.*b)(?=.*b)\pL|.*c)/
|
||||
+ 11bb
|
||||
+
|
||||
/-- End of testinput6 --/
|
||||
diff --git a/testdata/testoutput1 b/testdata/testoutput1
|
||||
index e852ab9..a2b3cff 100644
|
||||
--- a/testdata/testoutput1
|
||||
+++ b/testdata/testoutput1
|
||||
@@ -9434,4 +9434,12 @@ No match
|
||||
0:
|
||||
1:
|
||||
|
||||
+/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[,;:])(?=.{8,16})(?!.*[\s])/
|
||||
+ \ Fred:099
|
||||
+ 0:
|
||||
+
|
||||
+/(?=.*X)X$/
|
||||
+ \ X
|
||||
+ 0: X
|
||||
+
|
||||
/-- End of testinput1 --/
|
||||
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
||||
index 216bff8..811bbef 100644
|
||||
--- a/testdata/testoutput2
|
||||
+++ b/testdata/testoutput2
|
||||
@@ -9380,7 +9380,7 @@ No need char
|
||||
/(?(?=.*b).*b|^d)/I
|
||||
Capturing subpattern count = 0
|
||||
No options
|
||||
-First char at start or follows newline
|
||||
+No first char
|
||||
No need char
|
||||
|
||||
/xyz/C
|
||||
@@ -14698,4 +14698,11 @@ Failed: assertion expected after (?( or (?(?C) at offset 4
|
||||
End
|
||||
------------------------------------------------------------------
|
||||
|
||||
+/(?=.*[A-Z])/I
|
||||
+Capturing subpattern count = 0
|
||||
+May match empty string
|
||||
+No options
|
||||
+No first char
|
||||
+No need char
|
||||
+
|
||||
/-- End of testinput2 --/
|
||||
diff --git a/testdata/testoutput6 b/testdata/testoutput6
|
||||
index b64dc0d..422d383 100644
|
||||
--- a/testdata/testoutput6
|
||||
+++ b/testdata/testoutput6
|
||||
@@ -2573,4 +2573,12 @@ No match
|
||||
\x{20ac}
|
||||
No match
|
||||
|
||||
+/(?=.*b)\pL/
|
||||
+ 11bb
|
||||
+ 0: b
|
||||
+
|
||||
+/(?(?=.*b)(?=.*b)\pL|.*c)/
|
||||
+ 11bb
|
||||
+ 0: b
|
||||
+
|
||||
/-- End of testinput6 --/
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,36 +0,0 @@
|
||||
From 74599ddaf3dfb11277401eb6279dd32371f54e18 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Thu, 6 Oct 2016 16:32:46 +0000
|
||||
Subject: [PATCH] Fix pcretest callout display bug
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1665 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
|
||||
Petr Písař: Ported to 8.39.
|
||||
|
||||
diff --git a/pcretest.c b/pcretest.c
|
||||
index 5748c55..5b73a91 100644
|
||||
--- a/pcretest.c
|
||||
+++ b/pcretest.c
|
||||
@@ -1982,6 +1982,7 @@ return(result);
|
||||
static int pchar(pcre_uint32 c, FILE *f)
|
||||
{
|
||||
int n = 0;
|
||||
+char tempbuffer[16];
|
||||
if (PRINTOK(c))
|
||||
{
|
||||
if (f != NULL) fprintf(f, "%c", c);
|
||||
@@ -2003,6 +2004,8 @@ if (c < 0x100)
|
||||
}
|
||||
|
||||
if (f != NULL) n = fprintf(f, "\\x{%02x}", c);
|
||||
+ else n = sprintf(tempbuffer, "\\x{%02x}", c);
|
||||
+
|
||||
return n >= 0 ? n : 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 575b84a7bcbd63f54d933804ea5036642b93c0f7 Mon Sep 17 00:00:00 2001
|
||||
From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Fri, 1 Jul 2016 09:06:38 +0000
|
||||
Subject: [PATCH] Fix register overwite in JIT when SSE2 acceleration is
|
||||
enabled.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1660 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
|
||||
Petr Písař: Ported to 8.39.
|
||||
|
||||
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
|
||||
index 4f15a27..46ce6c6 100644
|
||||
--- a/pcre_jit_compile.c
|
||||
+++ b/pcre_jit_compile.c
|
||||
@@ -4004,12 +4004,12 @@ sljit_emit_op_custom(compiler, instruction, 4);
|
||||
|
||||
if (load_twice)
|
||||
{
|
||||
- OP1(SLJIT_MOV, TMP3, 0, TMP2, 0);
|
||||
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP2, 0);
|
||||
instruction[3] = 0xc0 | (tmp2_ind << 3) | 1;
|
||||
sljit_emit_op_custom(compiler, instruction, 4);
|
||||
|
||||
OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
|
||||
- OP1(SLJIT_MOV, TMP2, 0, TMP3, 0);
|
||||
+ OP1(SLJIT_MOV, TMP2, 0, RETURN_ADDR, 0);
|
||||
}
|
||||
|
||||
OP2(SLJIT_ASHR, TMP1, 0, TMP1, 0, TMP2, 0);
|
||||
diff --git a/pcre_jit_test.c b/pcre_jit_test.c
|
||||
index 9b61ec0..034cb52 100644
|
||||
--- a/pcre_jit_test.c
|
||||
+++ b/pcre_jit_test.c
|
||||
@@ -687,6 +687,7 @@ static struct regression_test_case regression_test_cases[] = {
|
||||
{ PCRE_FIRSTLINE | PCRE_NEWLINE_LF | PCRE_DOTALL, 0 | F_NOMATCH, "ab.", "ab" },
|
||||
{ MUA | PCRE_FIRSTLINE, 1 | F_NOMATCH, "^[a-d0-9]", "\nxx\nd" },
|
||||
{ PCRE_NEWLINE_ANY | PCRE_FIRSTLINE | PCRE_DOTALL, 0, "....a", "012\n0a" },
|
||||
+ { MUA | PCRE_FIRSTLINE, 0, "[aC]", "a" },
|
||||
|
||||
/* Recurse. */
|
||||
{ MUA, 0, "(a)(?1)", "aa" },
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,52 +0,0 @@
|
||||
From c53d4af2465bf11a8aefceb67bf7f7ae19b08ac5 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||
Date: Thu, 6 Oct 2016 17:49:48 +0000
|
||||
Subject: [PATCH] Fix typos in documentation
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1666 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
doc/pcrepattern.3 | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
|
||||
index 3b8c639..952451f 100644
|
||||
--- a/doc/pcrepattern.3
|
||||
+++ b/doc/pcrepattern.3
|
||||
@@ -336,22 +336,22 @@ When PCRE is compiled in EBCDIC mode, \ea, \ee, \ef, \en, \er, and \et
|
||||
generate the appropriate EBCDIC code values. The \ec escape is processed
|
||||
as specified for Perl in the \fBperlebcdic\fP document. The only characters
|
||||
that are allowed after \ec are A-Z, a-z, or one of @, [, \e, ], ^, _, or ?. Any
|
||||
-other character provokes a compile-time error. The sequence \e@ encodes
|
||||
-character code 0; the letters (in either case) encode characters 1-26 (hex 01
|
||||
-to hex 1A); [, \e, ], ^, and _ encode characters 27-31 (hex 1B to hex 1F), and
|
||||
-\e? becomes either 255 (hex FF) or 95 (hex 5F).
|
||||
+other character provokes a compile-time error. The sequence \ec@ encodes
|
||||
+character code 0; after \ec the letters (in either case) encode characters 1-26
|
||||
+(hex 01 to hex 1A); [, \e, ], ^, and _ encode characters 27-31 (hex 1B to hex
|
||||
+1F), and \ec? becomes either 255 (hex FF) or 95 (hex 5F).
|
||||
.P
|
||||
-Thus, apart from \e?, these escapes generate the same character code values as
|
||||
+Thus, apart from \ec?, these escapes generate the same character code values as
|
||||
they do in an ASCII environment, though the meanings of the values mostly
|
||||
-differ. For example, \eG always generates code value 7, which is BEL in ASCII
|
||||
+differ. For example, \ecG always generates code value 7, which is BEL in ASCII
|
||||
but DEL in EBCDIC.
|
||||
.P
|
||||
-The sequence \e? generates DEL (127, hex 7F) in an ASCII environment, but
|
||||
+The sequence \ec? generates DEL (127, hex 7F) in an ASCII environment, but
|
||||
because 127 is not a control character in EBCDIC, Perl makes it generate the
|
||||
APC character. Unfortunately, there are several variants of EBCDIC. In most of
|
||||
them the APC character has the value 255 (hex FF), but in the one Perl calls
|
||||
POSIX-BC its value is 95 (hex 5F). If certain other characters have POSIX-BC
|
||||
-values, PCRE makes \e? generate 95; otherwise it generates 255.
|
||||
+values, PCRE makes \ec? generate 95; otherwise it generates 255.
|
||||
.P
|
||||
After \e0 up to two further octal digits are read. If there are fewer than two
|
||||
digits, just those that are present are used. Thus the sequence \e0\ex\e015
|
||||
--
|
||||
2.7.4
|
||||
|
46
pcre.spec
46
pcre.spec
@ -1,8 +1,8 @@
|
||||
# Is this a stable/testing release:
|
||||
#%%global rcversion RC1
|
||||
%global rcversion RC1
|
||||
Name: pcre
|
||||
Version: 8.39
|
||||
Release: %{?rcversion:0.}6%{?rcversion:.%rcversion}%{?dist}
|
||||
Version: 8.40
|
||||
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
|
||||
%global myversion %{version}%{?rcversion:-%rcversion}
|
||||
Summary: Perl-compatible regular expression library
|
||||
Group: System Environment/Libraries
|
||||
@ -34,34 +34,6 @@ Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{?rcversio
|
||||
Patch0: pcre-8.21-multilib.patch
|
||||
# Refused by upstream, bug #675477
|
||||
Patch1: pcre-8.32-refused_spelling_terminated.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
|
||||
# 8.39
|
||||
Patch2: pcre-8.39-Fix-bad-interaction-between-o-and-M-in-pcregrep.patch
|
||||
# Fix register overwite in JIT when SSE2 acceleration is enabled,
|
||||
# in upstream after 8.39
|
||||
Patch3: pcre-8.39-Fix-register-overwite-in-JIT-when-SSE2-acceleration-.patch
|
||||
# Fix matching characters above 255 when a negative character type was used
|
||||
# without enabled UCP in a positive class, in upstream after 8.39,
|
||||
# upstream bug #1866
|
||||
Patch4: pcre-8.39-Fix-character-class-bug-when-a-Unicode-property-was-.patch
|
||||
# Fix displaying position in pcretest callout with an escape sequence greater
|
||||
# than \x{ff}, in upstream after 8.39
|
||||
Patch5: pcre-8.39-Fix-pcretest-callout-display-bug.patch
|
||||
# Fix pcrepattern(3) documentation, in upstream after 8.39
|
||||
Patch6: pcre-8.39-Fix-typos-in-documentation.patch
|
||||
# Fix miscopmilation of conditionals when a group name start with "R",
|
||||
# in upstream after 8.39, upstream bug #1873
|
||||
Patch7: pcre-8.39-Fix-bad-conditional-recursion-test-bug-when-a-group-.patch
|
||||
# Fix internal option documentation in pcrepattern(3), in upstream after 8.39,
|
||||
# upstream bug #1875
|
||||
Patch8: pcre-8.39-Fix-documentation-error.patch
|
||||
# Fix optimization bugs for patterns starting with lookaheads,
|
||||
# in upstream after 8.39, upstream bug #1882
|
||||
Patch9: pcre-8.39-Fix-optimization-bugs-for-patterns-starting-with-loo.patch
|
||||
# Document assert capture limitation, in upstream after 8.39,
|
||||
# upstream bug #1887
|
||||
Patch10: pcre-8.39-Document-assertion-capture-limitation.patch
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -151,15 +123,6 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
|
||||
# Get rid of rpath
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
# Because of rpath patch
|
||||
libtoolize --copy --force
|
||||
autoreconf -vif
|
||||
@ -256,6 +219,9 @@ make %{?_smp_mflags} check VERBOSE=yes
|
||||
%{_mandir}/man1/pcretest.*
|
||||
|
||||
%changelog
|
||||
* Mon Dec 12 2016 Petr Pisar <ppisar@redhat.com> - 8.40-0.1.RC1
|
||||
- 8.40-RC1 bump
|
||||
|
||||
* Mon Oct 24 2016 Petr Pisar <ppisar@redhat.com> - 8.39-6
|
||||
- Document assert capture limitation (upstream bug #1887)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user