[Pcre-svn] [729] code/trunk: Fix THEN:ARG bug introduced wit…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [729] code/trunk: Fix THEN:ARG bug introduced with *THEN refactoring.
Revision: 729
          http://vcs.pcre.org/viewvc?view=rev&revision=729
Author:   ph10
Date:     2011-10-10 17:02:20 +0100 (Mon, 10 Oct 2011)


Log Message:
-----------
Fix THEN:ARG bug introduced with *THEN refactoring.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/configure.ac
    code/trunk/pcre_study.c
    code/trunk/testdata/testinput2
    code/trunk/testdata/testoutput2


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2011-10-10 16:01:03 UTC (rev 728)
+++ code/trunk/ChangeLog    2011-10-10 16:02:20 UTC (rev 729)
@@ -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 @@
     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

Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac    2011-10-10 16:01:03 UTC (rev 728)
+++ code/trunk/configure.ac    2011-10-10 16:02:20 UTC (rev 729)
@@ -11,7 +11,7 @@
 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])

Modified: code/trunk/pcre_study.c
===================================================================
--- code/trunk/pcre_study.c    2011-10-10 16:01:03 UTC (rev 728)
+++ code/trunk/pcre_study.c    2011-10-10 16:02:20 UTC (rev 729)
@@ -492,13 +492,10 @@
     case OP_MARK:
     case OP_PRUNE_ARG:
     case OP_SKIP_ARG:
+    case OP_THEN_ARG:
     cc += _pcre_OP_lengths[op] + cc[1];
     break;


-    case OP_THEN_ARG:
-    cc += _pcre_OP_lengths[op] + cc[1+LINK_SIZE];
-    break;
-
     /* The remaining opcodes are just skipped over. */


     case OP_CLOSE:


Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2    2011-10-10 16:01:03 UTC (rev 728)
+++ code/trunk/testdata/testinput2    2011-10-10 16:02:20 UTC (rev 729)
@@ -3370,6 +3370,10 @@
     C
     D 


+/(*MARK:A)(*THEN:B)(C|X)/KSY
+    C
+    D 
+
 /(*MARK:A)(*THEN:B)(C|X)/KSS
     C
     D 


Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2    2011-10-10 16:01:03 UTC (rev 728)
+++ code/trunk/testdata/testoutput2    2011-10-10 16:02:20 UTC (rev 729)
@@ -11066,6 +11066,14 @@
  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 @@
  1: C
 MK: A
     D 
-No match, mark = B
+No match


 /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
     AAAC