10.21-RC1 bump
This commit is contained in:
parent
0e216e9ca6
commit
0da781beb7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/pcre2-10.10.tar.bz2
|
||||
/pcre2-10.20-RC1.tar.bz2
|
||||
/pcre2-10.20.tar.bz2
|
||||
/pcre2-10.21-RC1.tar.bz2
|
||||
|
@ -1,75 +0,0 @@
|
||||
From fb774225c09cdb4848026167035596f502f28a5f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Mon, 26 Oct 2015 10:17:01 +0100
|
||||
Subject: [PATCH] Fix PCRE2_NO_AUTO_CAPTURE bug
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream commit ported to 10.20:
|
||||
|
||||
From 0536f51c8511921664d1dbfa7fbc156d0d687942 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Sun, 25 Oct 2015 17:35:34 +0000
|
||||
Subject: [PATCH] Fix PCRE2_NO_AUTO_CAPTURE bug.
|
||||
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@393 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_compile.c | 7 ++++---
|
||||
testdata/testinput2 | 4 ++++
|
||||
testdata/testoutput2 | 6 ++++++
|
||||
3 files changed, 14 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
|
||||
index 5d3584d..13febc9 100644
|
||||
--- a/src/pcre2_compile.c
|
||||
+++ b/src/pcre2_compile.c
|
||||
@@ -3326,9 +3326,10 @@ for (; ptr < cb->end_pattern; ptr++)
|
||||
|
||||
if (ptr[1] != CHAR_QUESTION_MARK)
|
||||
{
|
||||
- if (ptr[1] != CHAR_ASTERISK &&
|
||||
- (options & PCRE2_NO_AUTO_CAPTURE) == 0)
|
||||
- cb->bracount++; /* Capturing group */
|
||||
+ if (ptr[1] != CHAR_ASTERISK)
|
||||
+ {
|
||||
+ if ((options & PCRE2_NO_AUTO_CAPTURE) == 0) cb->bracount++;
|
||||
+ }
|
||||
else /* (*something) - just skip to closing ket */
|
||||
{
|
||||
ptr += 2;
|
||||
diff --git a/testdata/testinput2 b/testdata/testinput2
|
||||
index dc64019..35ebe47 100644
|
||||
--- a/testdata/testinput2
|
||||
+++ b/testdata/testinput2
|
||||
@@ -4329,4 +4329,8 @@ a random value. /Ix
|
||||
|
||||
/^(o(\1{72}{\"{\\{00000059079}\d*){74}}){19}/I
|
||||
|
||||
+/((p(?'K/
|
||||
+
|
||||
+/((p(?'K/no_auto_capture
|
||||
+
|
||||
# End of testinput2
|
||||
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
||||
index cfc3ef0..3fdbc1f 100644
|
||||
--- a/testdata/testoutput2
|
||||
+++ b/testdata/testoutput2
|
||||
@@ -14478,4 +14478,10 @@ Overall options: anchored
|
||||
Last code unit = '}'
|
||||
Subject length lower bound = 52629
|
||||
|
||||
+/((p(?'K/
|
||||
+Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator)
|
||||
+
|
||||
+/((p(?'K/no_auto_capture
|
||||
+Failed: error 142 at offset 7: syntax error in subpattern name (missing terminator)
|
||||
+
|
||||
# End of testinput2
|
||||
--
|
||||
2.4.3
|
||||
|
@ -1,112 +0,0 @@
|
||||
From 70af28aa1984e6b5293b9699a9ad40647a1004c1 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Fri, 9 Oct 2015 16:06:53 +0000
|
||||
Subject: [PATCH] Fix compiler bug for classes such as [\W\p{Any}].
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream commit ported to 10.20:
|
||||
|
||||
commit 828e8822763794394ea98500bf0c6a5ffaf0f100
|
||||
Author: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Fri Oct 9 16:06:53 2015 +0000
|
||||
|
||||
Fix compiler bug for classes such as [\W\p{Any}].
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@384 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_compile.c | 18 ++++++++++--------
|
||||
testdata/testinput5 | 8 ++++++++
|
||||
testdata/testoutput5 | 24 ++++++++++++++++++++++++
|
||||
3 files changed, 42 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
|
||||
index 4a9e42e..5d3584d 100644
|
||||
--- a/src/pcre2_compile.c
|
||||
+++ b/src/pcre2_compile.c
|
||||
@@ -4675,19 +4675,21 @@ for (;; ptr++)
|
||||
zeroreqcu = reqcu;
|
||||
zeroreqcuflags = reqcuflags;
|
||||
|
||||
- /* If there are characters with values > 255, we have to compile an
|
||||
- extended class, with its own opcode, unless there was a negated special
|
||||
- such as \S in the class, and PCRE2_UCP is not set, because in that case all
|
||||
+ /* If there are characters with values > 255, or Unicode property settings
|
||||
+ (\p or \P), we have to compile an extended class, with its own opcode,
|
||||
+ unless there were no property settings and there was a negated special such
|
||||
+ as \S in the class, and PCRE2_UCP is not set, because in that case all
|
||||
characters > 255 are in the class, so any that were explicitly given as
|
||||
- well can be ignored. If (when there are explicit characters > 255 that must
|
||||
- be listed) there are no characters < 256, we can omit the bitmap in the
|
||||
- actual compiled code. */
|
||||
+ well can be ignored. If (when there are explicit characters > 255 or
|
||||
+ property settings that must be listed) there are no characters < 256, we
|
||||
+ can omit the bitmap in the actual compiled code. */
|
||||
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
#ifdef SUPPORT_UNICODE
|
||||
- if (xclass && (!should_flip_negation || (options & PCRE2_UCP) != 0))
|
||||
+ if (xclass && (xclass_has_prop || !should_flip_negation ||
|
||||
+ (options & PCRE2_UCP) != 0))
|
||||
#elif PCRE2_CODE_UNIT_WIDTH != 8
|
||||
- if (xclass && !should_flip_negation)
|
||||
+ if (xclass && (xclass_has_prop || !should_flip_negation))
|
||||
#endif
|
||||
{
|
||||
*class_uchardata++ = XCL_END; /* Marks the end of extra data */
|
||||
diff --git a/testdata/testinput5 b/testdata/testinput5
|
||||
index 7e2ba45..c4eb2af 100644
|
||||
--- a/testdata/testinput5
|
||||
+++ b/testdata/testinput5
|
||||
@@ -1651,4 +1651,12 @@
|
||||
|
||||
/$(&.+[\p{Me}].\s\xdcC*?(?(<y>))(?<!^)$C((;*?(R))+(?(R)){0,6}?|){12\x8a\X*?\x8a\x0b\xd1^9\3*+(\xc1,\k'P'\xb4)\xcc(z\z(?JJ)(?'X'8};(\x0b\xd1^9\?'3*+(\xc1.]k+\x0b'Pm'\xb4\xcc4'\xd1'(?'X'))?-%--\x95$9*\4'|\xd1(''%\x95*$9)#(?'R')3\x07?('P\xed')\\x16:;()\x1e\x10*:(?<y>)\xd1+!~:(?)''(d'E:yD!\s(?'R'\x1e;\x10:U))|')g!\xb0*){29+))#(?'P'})*?/
|
||||
|
||||
+/[\W\p{Any}]/B
|
||||
+ abc
|
||||
+ 123
|
||||
+
|
||||
+/[\W\pL]/B
|
||||
+ abc
|
||||
+ 123
|
||||
+
|
||||
# End of testinput5
|
||||
diff --git a/testdata/testoutput5 b/testdata/testoutput5
|
||||
index a99c12b..babb9df 100644
|
||||
--- a/testdata/testoutput5
|
||||
+++ b/testdata/testoutput5
|
||||
@@ -4050,4 +4050,28 @@ Failed: error 122 at offset 1227: unmatched closing parenthesis
|
||||
|
||||
/$(&.+[\p{Me}].\s\xdcC*?(?(<y>))(?<!^)$C((;*?(R))+(?(R)){0,6}?|){12\x8a\X*?\x8a\x0b\xd1^9\3*+(\xc1,\k'P'\xb4)\xcc(z\z(?JJ)(?'X'8};(\x0b\xd1^9\?'3*+(\xc1.]k+\x0b'Pm'\xb4\xcc4'\xd1'(?'X'))?-%--\x95$9*\4'|\xd1(''%\x95*$9)#(?'R')3\x07?('P\xed')\\x16:;()\x1e\x10*:(?<y>)\xd1+!~:(?)''(d'E:yD!\s(?'R'\x1e;\x10:U))|')g!\xb0*){29+))#(?'P'})*?/
|
||||
|
||||
+/[\W\p{Any}]/B
|
||||
+------------------------------------------------------------------
|
||||
+ Bra
|
||||
+ [\x00-/:-@[-^`{-\xff\p{Any}]
|
||||
+ Ket
|
||||
+ End
|
||||
+------------------------------------------------------------------
|
||||
+ abc
|
||||
+ 0: a
|
||||
+ 123
|
||||
+ 0: 1
|
||||
+
|
||||
+/[\W\pL]/B
|
||||
+------------------------------------------------------------------
|
||||
+ Bra
|
||||
+ [\x00-/:-@[-^`{-\xff\p{L}]
|
||||
+ Ket
|
||||
+ End
|
||||
+------------------------------------------------------------------
|
||||
+ abc
|
||||
+ 0: a
|
||||
+ 123
|
||||
+No match
|
||||
+
|
||||
# End of testinput5
|
||||
--
|
||||
2.4.3
|
||||
|
@ -1,110 +0,0 @@
|
||||
From 3d9c33b0c83722c90ca091389aff9056d97a8e93 Mon Sep 17 00:00:00 2001
|
||||
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Fri, 9 Oct 2015 16:54:29 +0000
|
||||
Subject: [PATCH] Fix integer overflow for patterns whose minimum matching
|
||||
length is very, very large.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream commit ported to 10.20:
|
||||
|
||||
commit 91cb973c4537327c18217b50f20e82283affe976
|
||||
Author: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Fri Oct 9 16:54:29 2015 +0000
|
||||
|
||||
Fix integer overflow for patterns whose minimum matching length is very, very
|
||||
large.
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@385 6239d852-aaf2-0410-a92c-79f79f948069
|
||||
|
||||
The "Subject length lower bound" in testoutput should be 65535, but
|
||||
it's not because the lower bound guess was improved in:
|
||||
|
||||
commit 209880186ae777d2404560fff04d4e3c36b55ffe
|
||||
Author: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||
Date: Sat Aug 1 09:11:28 2015 +0000
|
||||
|
||||
Fix issues with minimum length finding.
|
||||
|
||||
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@331 6239d852-aaf2-0410-a92c-
|
||||
79f79f948069
|
||||
|
||||
that is quite invasive, thus not ported. Therefore the test returns
|
||||
suboptimal value.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/pcre2_study.c | 12 +++++++++---
|
||||
testdata/testinput2 | 2 ++
|
||||
testdata/testoutput2 | 8 ++++++++
|
||||
3 files changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/pcre2_study.c b/src/pcre2_study.c
|
||||
index 25d7e51..a5c2cb4 100644
|
||||
--- a/src/pcre2_study.c
|
||||
+++ b/src/pcre2_study.c
|
||||
@@ -66,8 +66,11 @@ enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE, SSB_UNKNOWN };
|
||||
|
||||
/* Scan a parenthesized group and compute the minimum length of subject that
|
||||
is needed to match it. This is a lower bound; it does not mean there is a
|
||||
-string of that length that matches. In UTF8 mode, the result is in characters
|
||||
-rather than bytes.
|
||||
+string of that length that matches. In UTF mode, the result is in characters
|
||||
+rather than code units. The field in a compiled pattern for storing the minimum
|
||||
+length is 16-bits long (on the grounds that anything longer than that is
|
||||
+pathological), so we give up when we reach that amount. This also means that
|
||||
+integer overflow for really crazy patterns cannot happen.
|
||||
|
||||
Arguments:
|
||||
re compiled pattern block
|
||||
@@ -97,7 +100,8 @@ if (*code == OP_CBRA || *code == OP_SCBRA ||
|
||||
*code == OP_CBRAPOS || *code == OP_SCBRAPOS) cc += IMM2_SIZE;
|
||||
|
||||
/* Scan along the opcodes for this branch. If we get to the end of the
|
||||
-branch, check the length against that of the other branches. */
|
||||
+branch, check the length against that of the other branches. If the accumulated
|
||||
+length passes 16-bits, stop and return it. */
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -105,6 +109,8 @@ for (;;)
|
||||
PCRE2_UCHAR *cs, *ce;
|
||||
register PCRE2_UCHAR op = *cc;
|
||||
|
||||
+ if (branchlength > UINT16_MAX) return branchlength;
|
||||
+
|
||||
switch (op)
|
||||
{
|
||||
case OP_COND:
|
||||
diff --git a/testdata/testinput2 b/testdata/testinput2
|
||||
index e0e149f..dc64019 100644
|
||||
--- a/testdata/testinput2
|
||||
+++ b/testdata/testinput2
|
||||
@@ -4327,4 +4327,6 @@ a random value. /Ix
|
||||
|
||||
/^(?:(?(1)x|)+)+$()/B
|
||||
|
||||
+/^(o(\1{72}{\"{\\{00000059079}\d*){74}}){19}/I
|
||||
+
|
||||
# End of testinput2
|
||||
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
||||
index b628466..cfc3ef0 100644
|
||||
--- a/testdata/testoutput2
|
||||
+++ b/testdata/testoutput2
|
||||
@@ -14470,4 +14470,12 @@ Failed: error 161 at offset 32: number is too big
|
||||
End
|
||||
------------------------------------------------------------------
|
||||
|
||||
+/^(o(\1{72}{\"{\\{00000059079}\d*){74}}){19}/I
|
||||
+Capturing subpattern count = 2
|
||||
+Max back reference = 1
|
||||
+Compile options: <none>
|
||||
+Overall options: anchored
|
||||
+Last code unit = '}'
|
||||
+Subject length lower bound = 52629
|
||||
+
|
||||
# End of testinput2
|
||||
--
|
||||
2.4.3
|
||||
|
26
pcre2.spec
26
pcre2.spec
@ -1,13 +1,15 @@
|
||||
# This is stable release:
|
||||
#%%global rcversion RC1
|
||||
# This is not stable release:
|
||||
%global rcversion RC1
|
||||
Name: pcre2
|
||||
Version: 10.20
|
||||
Release: %{?rcversion:0.}3%{?rcversion:.%rcversion}%{?dist}
|
||||
Version: 10.21
|
||||
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
|
||||
%global myversion %{version}%{?rcversion:-%rcversion}
|
||||
Summary: Perl-compatible regular expression library
|
||||
Group: System Environment/Libraries
|
||||
# the library: BSD
|
||||
# pcre2test (linked to GNU readline): BSD (linked to GPLv3+)
|
||||
# COPYING: GPLv3 text (a mistake
|
||||
# <https://lists.exim.org/lurker/message/20160105.155106.d2c85abf.en.html>)
|
||||
#Not distributed in binary package
|
||||
# autotools: GPLv3+ with exception
|
||||
# install-sh: MIT
|
||||
@ -16,15 +18,6 @@ URL: http://www.pcre.org/
|
||||
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
|
||||
Patch0: pcre2-10.10-Fix-multilib.patch
|
||||
# Fix compiling classes with a negative escape and a property escape,
|
||||
# upstream bug #1697, fixed in upstream after 10.20.
|
||||
Patch1: pcre2-10.20-Fix-compiler-bug-for-classes-such-as-W-p-Any.patch
|
||||
# Fix integer overflow for patterns whose minimum matching length is large,
|
||||
# upstream bug #1699, fixed in upstream after 10.20.
|
||||
Patch2: pcre2-10.20-Fix-integer-overflow-for-patterns-whose-minimum-matc.patch
|
||||
# Fix compiling patterns with PCRE2_NO_AUTO_CAPTURE, upstream bug #1704,
|
||||
# fixed in upstream after 10.20.
|
||||
Patch3: pcre2-10.20-Fix-PCRE2_NO_AUTO_CAPTURE-bug.patch
|
||||
|
||||
# New libtool to get rid of RPATH and to use distribution autotools
|
||||
BuildRequires: autoconf
|
||||
@ -85,9 +78,6 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
||||
%prep
|
||||
%setup -q -n %{name}-%{myversion}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
# Because of multilib patch
|
||||
libtoolize --copy --force
|
||||
autoreconf -vif
|
||||
@ -108,6 +98,7 @@ autoreconf -vif
|
||||
--disable-bsr-anycrlf \
|
||||
--disable-coverage \
|
||||
--disable-ebcdic \
|
||||
--disable-never-backslash-C \
|
||||
--enable-newline-is-lf \
|
||||
--enable-pcre2-8 \
|
||||
--enable-pcre2-16 \
|
||||
@ -166,6 +157,9 @@ make %{?_smp_mflags} check VERBOSE=yes
|
||||
%{_mandir}/man1/pcre2test.*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 05 2016 Petr Pisar <ppisar@redhat.com> - 10.21-0.1.RC1
|
||||
- 10.21-RC1 bump
|
||||
|
||||
* Mon Oct 26 2015 Petr Pisar <ppisar@redhat.com> - 10.20-3
|
||||
- Fix compiling patterns with PCRE2_NO_AUTO_CAPTURE (upstream bug #1704)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user