8.33-RC1 bump

This commit is contained in:
Petr Písař 2013-05-07 15:28:36 +02:00
parent 25b56008b2
commit fc76cf56db
6 changed files with 46 additions and 167 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ pcre-8.10.tar.bz2
/pcre-8.31.tar.bz2
/pcre-8.32-RC1.tar.bz2
/pcre-8.32.tar.bz2
/pcre-8.33-RC1.tar.bz2

View File

@ -1,50 +0,0 @@
From 693f81d9b37934fdb3a0b1de6d06cacbecaffb63 Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Fri, 18 Jan 2013 08:20:44 +0000
Subject: [PATCH] Fix forward search in JIT when link size is 3 or greater.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1239 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Pisar: Ported to 8.32.
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index cc9f097..3b83340 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -2573,7 +2573,7 @@ DEFINE_COMPILER;
struct sljit_label *start;
struct sljit_jump *quit;
pcre_uint32 chars[MAX_N_CHARS * 2];
-pcre_uchar *cc = common->start + 1 + IMM2_SIZE;
+pcre_uchar *cc = common->start + 1 + LINK_SIZE;
int location = 0;
pcre_int32 len, c, bit, caseless;
int must_stop;
diff --git a/testdata/testinput12 b/testdata/testinput12
index 7deba3c..92c9603 100644
--- a/testdata/testinput12
+++ b/testdata/testinput12
@@ -86,4 +86,7 @@ and a couple of things that are different with JIT. --/
/.?(*THEN)/S!+I
+/^12345678abcd/mS++
+ 12345678abcd
+
/-- End of testinput12 --/
diff --git a/testdata/testoutput12 b/testdata/testoutput12
index 559f48d..f3c0230 100644
--- a/testdata/testoutput12
+++ b/testdata/testoutput12
@@ -178,4 +178,8 @@ Subject length lower bound = -1
No set of starting bytes
JIT study was not successful
+/^12345678abcd/mS++
+ 12345678abcd
+ 0: 12345678abcd (JIT)
+
/-- End of testinput12 --/
--
1.8.1

View File

@ -1,107 +0,0 @@
From be692806851f4883b87fc814adc80ab1bb46455e Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Sat, 26 Jan 2013 17:51:43 +0000
Subject: [PATCH] Fix two buffer over read issues in 16 and 32 bit modes.
Affects JIT only.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1242 2f5784b3-3f2a-0410-8824-cb99058d5e15
Petr Pisar: Ported to 8.32.
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index 3b83340..7dfe558 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -2696,10 +2696,10 @@ if (firstline)
{
SLJIT_ASSERT(common->first_line_end != 0);
OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
- OP2(SLJIT_SUB, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, SLJIT_IMM, (location >> 1) - 1);
+ OP2(SLJIT_SUB, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, SLJIT_IMM, IN_UCHARS((location >> 1) - 1));
}
else
- OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, (location >> 1) - 1);
+ OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS((location >> 1) - 1));
start = LABEL();
quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
@@ -2728,7 +2728,7 @@ JUMPHERE(quit);
if (firstline)
OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
else
- OP2(SLJIT_ADD, STR_END, 0, STR_END, 0, SLJIT_IMM, (location >> 1) - 1);
+ OP2(SLJIT_ADD, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS((location >> 1) - 1));
return TRUE;
}
@@ -3577,7 +3577,7 @@ do
#endif
context->length -= IN_UCHARS(1);
-#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED) && (defined COMPILE_PCRE8 || defined COMPILE_PCRE16)
/* Unaligned read is supported. */
if (othercasebit != 0 && othercasechar == cc)
@@ -3594,27 +3594,18 @@ do
#if defined COMPILE_PCRE8
if (context->ucharptr >= 4 || context->length == 0 || (context->ucharptr == 2 && context->length == 1))
-#elif defined COMPILE_PCRE16
+#else
if (context->ucharptr >= 2 || context->length == 0)
-#elif defined COMPILE_PCRE32
- if (1 /* context->ucharptr >= 1 || context->length == 0 */)
#endif
{
-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
if (context->length >= 4)
OP1(SLJIT_MOV_SI, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#if defined COMPILE_PCRE8
else if (context->length >= 2)
OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#if defined COMPILE_PCRE8
else if (context->length >= 1)
OP1(SLJIT_MOV_UB, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#elif defined COMPILE_PCRE16
- else if (context->length >= 2)
- OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#endif /* COMPILE_PCRE[8|16] */
-#elif defined COMPILE_PCRE32
- OP1(MOV_UCHAR, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#endif /* COMPILE_PCRE[8|16|32] */
+#endif /* COMPILE_PCRE8 */
context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
switch(context->ucharptr)
@@ -3625,7 +3616,6 @@ do
add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asint | context->oc.asint));
break;
-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
case 2 / sizeof(pcre_uchar):
if (context->oc.asushort != 0)
OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asushort);
@@ -3640,8 +3630,6 @@ do
break;
#endif
-#endif /* COMPILE_PCRE[8|16] */
-
default:
SLJIT_ASSERT_STOP();
break;
@@ -3651,8 +3639,8 @@ do
#else
- /* Unaligned read is unsupported. */
- if (context->length > 0)
+ /* Unaligned read is unsupported or in 32 bit mode. */
+ if (context->length >= 1)
OP1(MOV_UCHAR, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
--
1.8.1

View File

@ -0,0 +1,35 @@
From a1439f72862fadeb63133e4474e4fba36bc134b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 2 May 2013 17:11:58 +0200
Subject: [PATCH] Fix retrieving PCRE_INFO_MATCHLIMIT and
PCRE_INFO_RECURSIONLIMIT
Tests exhibiting pcre_fullinfo() failed on 64-bit PowerPC because
there was mismatch on destination variable size in
PCRE_INFO_MATCHLIMIT and PCRE_INFO_RECURSIONLIMIT cases.
---
pcre_fullinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pcre_fullinfo.c b/pcre_fullinfo.c
index 36dfb0e..c4eb5c0 100644
--- a/pcre_fullinfo.c
+++ b/pcre_fullinfo.c
@@ -224,12 +224,12 @@ switch (what)
case PCRE_INFO_MATCHLIMIT:
if ((re->flags & PCRE_MLSET) == 0) return PCRE_ERROR_UNSET;
- *((unsigned long int *)where) = re->limit_match;
+ *((pcre_uint32 *)where) = re->limit_match;
break;
case PCRE_INFO_RECURSIONLIMIT:
if ((re->flags & PCRE_RLSET) == 0) return PCRE_ERROR_UNSET;
- *((unsigned long int *)where) = re->limit_recursion;
+ *((pcre_uint32 *)where) = re->limit_recursion;
break;
default: return PCRE_ERROR_BADOPTION;
--
1.8.1.4

View File

@ -1,8 +1,8 @@
# This is stable release:
#%%global rcversion RC1
%global rcversion RC1
Name: pcre
Version: 8.32
Release: %{?rcversion:0.}4%{?rcversion:.%rcversion}%{?dist}
Version: 8.33
Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist}
%global myversion %{version}%{?rcversion:-%rcversion}
Summary: Perl-compatible regular expression library
Group: System Environment/Libraries
@ -13,10 +13,8 @@ Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{?rcversion:Te
Patch0: pcre-8.21-multilib.patch
# Refused by upstream, bug #675477
Patch1: pcre-8.32-refused_spelling_terminated.patch
# In upstream after 8.32
Patch2: pcre-8.32-Fix-forward-search-in-JIT-when-link-size-is-3-or-gre.patch
# In upstream after 8.32
Patch3: pcre-8.32-Fix-two-buffer-over-read-issues-in-16-and-32-bit-mod.patch
# Fix big-endian issues, accepted by upstream after 8.33-RC1
Patch2: pcre-8.33-RC1-Fix-retrieving-PCRE_INFO_MATCHLIMIT-and-PCRE_INFO_RE.patch
BuildRequires: readline-devel
# New libtool to get rid of rpath
BuildRequires: autoconf, automake, libtool
@ -58,8 +56,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
# Get rid of rpath
%patch0 -p1 -b .multilib
%patch1 -p1 -b .terminated_typos
%patch2 -p1 -b .forward_jit
%patch3 -p1 -b .buffer_over_read
%patch2 -p1 -b .fullinfo
# Because of rpath patch
libtoolize --copy --force && autoreconf -vif
# One contributor's name is non-UTF-8
@ -123,6 +120,9 @@ make check
%{_mandir}/man1/pcretest.*
%changelog
* Thu May 02 2013 Petr Pisar <ppisar@redhat.com> - 8.33-0.1.RC1
- 8.33-RC1 bump
* Mon Jan 28 2013 Petr Pisar <ppisar@redhat.com> - 8.32-4
- Fix forward search in JIT when link size is 3 or greater
- Fix buffer over-read in UTF-16 and UTF-32 modes with JIT

View File

@ -1 +1 @@
62f02a76bb57a40bc66681760ed511d5 pcre-8.32.tar.bz2
fbfca8ce7f1f7aebba2d7c16aad795c9 pcre-8.33-RC1.tar.bz2