summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-10-10 16:02:20 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-10-10 16:02:20 +0000
commit26bad8781a7da224d2b54ef903a0fba474ba61e5 (patch)
treea8566b393a83cf10859efb5ad6074827e166524a
parentadb2ce0ceb33f09fe256ab3b78d61440f9e3ec24 (diff)
downloadpcre-26bad8781a7da224d2b54ef903a0fba474ba61e5.tar.gz
Fix THEN:ARG bug introduced with *THEN refactoring.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@729 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac2
-rw-r--r--pcre_study.c5
-rw-r--r--testdata/testinput24
-rw-r--r--testdata/testoutput210
5 files changed, 20 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d82deb1..ff1069c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
ChangeLog for PCRE
------------------
-Version 8.20 23-Sep-2011
+Version 8.20 10-Oct-2011
------------------------
1. Change 37 of 8.13 broke patterns like [:a]...[b:] because it thought it had
@@ -99,6 +99,10 @@ Version 8.20 23-Sep-2011
inevitable for groups that contain captures, but it can lead to a lot of
stack use in large patterns. The old behaviour has been restored for atomic
groups that do not contain any capturing parentheses.
+
+19. If the PCRE_NO_START_OPTIMIZE option was set for pcre_compile(), it did not
+ suppress the check for a minimum subject length at run time. (If it was
+ given to pcre_exec() or pcre_dfa_exec() it did work.)
Version 8.13 16-Aug-2011
diff --git a/configure.ac b/configure.ac
index 1886657..08048f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
m4_define(pcre_minor, [20])
m4_define(pcre_prerelease, [-RC3])
-m4_define(pcre_date, [2011-09-30])
+m4_define(pcre_date, [2011-10-10])
# Libtool shared library interface versions (current:revision:age)
m4_define(libpcre_version, [0:1:0])
diff --git a/pcre_study.c b/pcre_study.c
index 1dbd651..adffb3f 100644
--- a/pcre_study.c
+++ b/pcre_study.c
@@ -492,11 +492,8 @@ for (;;)
case OP_MARK:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
- cc += _pcre_OP_lengths[op] + cc[1];
- break;
-
case OP_THEN_ARG:
- cc += _pcre_OP_lengths[op] + cc[1+LINK_SIZE];
+ cc += _pcre_OP_lengths[op] + cc[1];
break;
/* The remaining opcodes are just skipped over. */
diff --git a/testdata/testinput2 b/testdata/testinput2
index e7a3e57..cc5f631 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -3370,6 +3370,10 @@ name were given. ---/
C
D
+/(*MARK:A)(*THEN:B)(C|X)/KSY
+ C
+ D
+
/(*MARK:A)(*THEN:B)(C|X)/KSS
C
D
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index 303c670..ab6580b 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -11066,6 +11066,14 @@ No match, mark = B
1: C
MK: A
D
+No match
+
+/(*MARK:A)(*THEN:B)(C|X)/KSY
+ C
+ 0: C
+ 1: C
+MK: A
+ D
No match, mark = B
/(*MARK:A)(*THEN:B)(C|X)/KSS
@@ -11231,7 +11239,7 @@ No match
1: C
MK: A
D
-No match, mark = B
+No match
/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
AAAC