8.20-RC1 bump

This commit is contained in:
Petr Písař 2011-09-12 16:51:37 +02:00
parent 584e50ee6c
commit 9ab62f88bd
6 changed files with 25 additions and 195 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ pcre-8.10.tar.bz2
/pcre-8.11.tar.bz2
/pcre-8.12.tar.bz2
/pcre-8.13.tar.bz2
/pcre-8.20-RC1.tar.bz2

View File

@ -1,115 +0,0 @@
r680 | ph10 | 2011-09-06 11:15:54 +0200 (Út, 06 zář 2011) | 2 lines
Fix small return value bug.
Index: pcre_dfa_exec.c
===================================================================
--- pcre_dfa_exec.c (revision 679)
+++ pcre_dfa_exec.c (revision 680)
@@ -768,7 +768,7 @@
current_subject > start_subject + md->start_offset)))
{
if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;
- else if (match_count > 0 && ++match_count * 2 >= offsetcount)
+ else if (match_count > 0 && ++match_count * 2 > offsetcount)
match_count = 0;
count = ((match_count == 0)? offsetcount : match_count * 2) - 2;
if (count > 0) memmove(offsets + 2, offsets, count * sizeof(int));
r681 | ph10 | 2011-09-06 11:16:32 +0200 (Út, 06 zář 2011) | 2 lines
Fix loop/bad error when recursed group contains (*PRUNE) etc.
When the number of matches in a pcre_dfa_exec() run exactly filled the
ovector, the return from the function was zero, implying that there were
other matches that did not fit. The correct "exactly full" value is now
returned.
If a subpattern that was called recursively or as a subroutine contained
(*PRUNE) or any other control that caused it to give a non-standard return,
invalid errors such as "Error -26 (nested recursion at the same subject
position)" or even infinite loops could occur.
Index: pcre_exec.c
===================================================================
--- pcre_exec.c (revision 680)
+++ pcre_exec.c (revision 681)
@@ -1556,10 +1556,10 @@
md, eptrb, RM6);
memcpy(md->offset_vector, new_recursive.offset_save,
new_recursive.saved_max * sizeof(int));
+ md->recursive = new_recursive.prevrec;
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
{
DPRINTF(("Recursion matched\n"));
- md->recursive = new_recursive.prevrec;
if (new_recursive.offset_save != stacksave)
(pcre_free)(new_recursive.offset_save);
Index: testdata/testoutput11
===================================================================
--- testdata/testoutput11 (revision 681)
+++ testdata/testoutput11 (revision 682)
@@ -1259,4 +1259,12 @@
MK: any
name
+/(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
+ a
+ 0: a
+ ba
+ 0: a
+ bba
+ 0: a
+
/-- End of testinput11 --/
Index: testdata/testinput7
===================================================================
--- testdata/testinput7 (revision 681)
+++ testdata/testinput7 (revision 682)
@@ -4699,4 +4699,8 @@
/(?(R)a*(?1)|((?R))b)/
aaaabcde
+/(a+)/
+ \O6aaaa
+ \O8aaaa
+
/-- End of testinput7 --/
Index: testdata/testoutput7
===================================================================
--- testdata/testoutput7 (revision 681)
+++ testdata/testoutput7 (revision 682)
@@ -7846,4 +7846,16 @@
aaaabcde
Error -26 (nested recursion at the same subject position)
+/(a+)/
+ \O6aaaa
+Matched, but too many subsidiary matches
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ \O8aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+
/-- End of testinput7 --/
Index: testdata/testinput11
===================================================================
--- testdata/testinput11 (revision 681)
+++ testdata/testinput11 (revision 682)
@@ -670,4 +670,9 @@
name)/K
abc
+/(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
+ a
+ ba
+ bba
+
/-- End of testinput11 --/

View File

@ -1,54 +0,0 @@
r661 | ph10 | 2011-08-21 11:00:54 +0200 (Ne, 21 srp 2011) | 2 lines
Fix bug introduced by 8.13/37 concerning POSIX class recognition
Change 37 of 8.13 broke patterns like [:a]...[b:] because it thought it had
a POSIX class. After further experiments with Perl, which convinced me that
Perl has bugs and confusions, a closing square bracket is no longer allowed in
a POSIX name.
Petr Pisar: Changelog entries removed, tests adjusted as upstream want to tune
them after merging JIT code.
Index: pcre_compile.c
===================================================================
--- a/pcre_compile.c (revision 660)
+++ b/pcre_compile.c (revision 661)
@@ -2295,9 +2295,14 @@
A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
It seems that the appearance of a nested POSIX class supersedes an apparent
external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or
-a digit. Also, unescaped square brackets may also appear as part of class
-names. For example, [:a[:abc]b:] gives unknown class "[:abc]b:]"in Perl.
+a digit.
+In Perl, unescaped square brackets may also appear as part of class names. For
+example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for
+[:a[:abc]b][b:] it gives unknown POSIX class "[:abc]b][b:]", which does not
+seem right at all. PCRE does not allow closing square brackets in POSIX class
+names.
+
Arguments:
ptr pointer to the initial [
endptr where to return the end pointer
@@ -2314,6 +2319,7 @@
{
if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
ptr++;
+ else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
else
{
if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
Index: testdata/testoutput2
===================================================================
--- a/testdata/testoutput2 (revision 661)
+++ b/testdata/testoutput2 (working copy)
@@ -12137,7 +12137,6 @@
------------------------------------------------------------------
/[:a[:abc]b:]/
-Failed: unknown POSIX class name at offset 5
/((?2))((?1))/
abc

View File

@ -1,7 +1,7 @@
From 4ba5f675be443041e5919cb125970f917a2326df Mon Sep 17 00:00:00 2001
From a0530232f6ba0499bd14390fc54244fadd82b5d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 7 Feb 2011 11:37:09 +0100
Subject: [PATCH 2/2] Fix spelling in pcretest(1) manual
Subject: [PATCH] Fix spelling in pcretest(1) manual
I kept some non-dictionary words to be consistent.
Credits to John Bradshaw.
@ -13,17 +13,15 @@ Collins dictionary of spelling and word division shows "termin-ate" and
"termin-ating". I do know that there is a cultural difference between
British and American hyphenation conventions; I try to follow the
British ones, as exemplified in the Collins.
---
doc/pcretest.1 | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
doc/pcretest.1 | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/pcretest.1 b/doc/pcretest.1
index c5d4fd6..c3266ab 100644
index 2689bfa..cef1727 100644
--- a/doc/pcretest.1
+++ b/doc/pcretest.1
@@ -361,8 +361,8 @@ recognized:
@@ -413,8 +413,8 @@ recognized:
after a successful match (number less than 32)
.\" JOIN
\eCname call pcre_copy_named_substring() for substring
@ -34,7 +32,7 @@ index c5d4fd6..c3266ab 100644
.\" JOIN
\eC+ show the current captured substrings at callout
time
@@ -383,8 +383,8 @@ recognized:
@@ -435,8 +435,8 @@ recognized:
after a successful match (number less than 32)
.\" JOIN
\eGname call pcre_get_named_substring() for substring
@ -43,5 +41,8 @@ index c5d4fd6..c3266ab 100644
+ "name" after a successful match (name terminated
+ by next non-alphanumeric character)
.\" JOIN
\eL call pcre_get_substringlist() after a
successful match
\eJdd set up a JIT stack of dd kilobytes maximum (any
number of digits)
--
1.7.6.1

View File

@ -1,20 +1,16 @@
%global rcversion RC1
Name: pcre
Version: 8.13
Release: 4%{?dist}
Version: 8.20
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
%global myversion %{version}%{?rcversion:-%rcversion}
Summary: Perl-compatible regular expression library
Group: System Environment/Libraries
License: BSD
URL: http://www.pcre.org/
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{name}-%{version}.tar.bz2
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2
Patch0: pcre-8.10-multilib.patch
# Refused by upstream, bug #675477
Patch1: pcre-8.12-refused_spelling_terminated.patch
# Upstream bug #1136 fixed after 8.13, rhbz #732368
Patch2: pcre-8.13-named_class_tokenizer.patch
# Upstream bug
# <https://lists.exim.org/lurker/message/20110904.203623.a32346f3.en.html>
# fixed after 8.13, rhbz #735720
Patch3: pcre-8.13-infinite_prune.patch
Patch1: pcre-8.20-refused_spelling_terminated.patch
BuildRequires: readline-devel
# New libtool to get rid of rpath
BuildRequires: autoconf, automake, libtool
@ -50,13 +46,11 @@ Group: Development/Tools
Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
%prep
%setup -q
%setup -q -n %{name}-%{myversion}
# Get rid of rpath
%patch0 -p1 -b .multilib
libtoolize --copy --force && autoreconf
%patch1 -p1 -b .terminated_typos
%patch2 -p1 -b .named_class_tokenizer
%patch3 -p0 -b .infinite_prune
# One contributor's name is non-UTF-8
for F in ChangeLog; do
iconv -f latin1 -t utf8 "$F" >"${F}.utf8"
@ -65,7 +59,7 @@ for F in ChangeLog; do
done
%build
%configure --enable-pcretest-libreadline --enable-utf8 \
%configure --enable-jit --enable-pcretest-libreadline --enable-utf8 \
--enable-unicode-properties
make %{?_smp_mflags}
@ -118,6 +112,9 @@ make check
%{_mandir}/man1/pcretest.*
%changelog
* Mon Sep 12 2011 Petr Pisar <ppisar@redhat.com> - 8.20-0.1.RC1
- 8.20-RC1 bump with JIT
* Tue Sep 06 2011 Petr Pisar <ppisar@redhat.com> - 8.13-4
- Fix infinite matching PRUNE (bug #735720)

View File

@ -1 +1 @@
5e595edbcded141813fa1a10dbce05cb pcre-8.13.tar.bz2
75d74012a49161b79ff2a32b462f3019 pcre-8.20-RC1.tar.bz2