[Pcre-svn] [1265] code/trunk: Fix missing callout in alterna…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [1265] code/trunk: Fix missing callout in alternative of conditional group when auto callout is
Revision: 1265
          http://vcs.pcre.org/viewvc?view=rev&revision=1265
Author:   ph10
Date:     2013-03-03 10:42:46 +0000 (Sun, 03 Mar 2013)


Log Message:
-----------
Fix missing callout in alternative of conditional group when auto callout is
set.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcre_exec.c
    code/trunk/testdata/testoutput2


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2013-02-27 17:31:46 UTC (rev 1264)
+++ code/trunk/ChangeLog    2013-03-03 10:42:46 UTC (rev 1265)
@@ -84,6 +84,11 @@
     which points out that "non characters" are not "characters that may not 
     appear in Unicode strings" but rather "characters that are reserved for 
     internal use and have only local meaning".
+    
+22. When a pattern was compiled with automatic callouts (PCRE_AUTO_CALLOUT) and
+    there was a conditional group that depended on an assertion, if the 
+    assertion was false, the callout that immediately followed the alternation 
+    in the condition was skipped when pcre_exec() was used for matching.



Version 8.32 30-November-2012

Modified: code/trunk/pcre_exec.c
===================================================================
--- code/trunk/pcre_exec.c    2013-02-27 17:31:46 UTC (rev 1264)
+++ code/trunk/pcre_exec.c    2013-03-03 10:42:46 UTC (rev 1265)
@@ -1318,6 +1318,7 @@
         if (rrc < 0) RRETURN(rrc);
         }
       ecode += PRIV(OP_lengths)[OP_CALLOUT];
+      codelink -= PRIV(OP_lengths)[OP_CALLOUT]; 
       }


     condcode = ecode[LINK_SIZE+1];


Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2    2013-02-27 17:31:46 UTC (rev 1264)
+++ code/trunk/testdata/testoutput2    2013-03-03 10:42:46 UTC (rev 1265)
@@ -9277,6 +9277,7 @@
  +7 ^ ^     b
  +7 ^^      b
  +7 ^       b
++11 ^       ^
 +12 ^       )
 +13 ^       
  0: 
@@ -9407,12 +9408,14 @@
  +3 ^ ^      (?(?=[a])[^"])
  +5 ^ ^      (?=[a])
  +8 ^ ^      [a]
++17 ^ ^      |
 +21 ^ ^      "
 +18 ^ ^      b
 +19 ^  ^     )
  +3 ^  ^     (?(?=[a])[^"])
  +5 ^  ^     (?=[a])
  +8 ^  ^     [a]
++17 ^  ^     |
 +21 ^  ^     "
 +22 ^   ^    $
 +23 ^   ^