[Pcre-svn] [170] code/trunk/src/pcre2_jit_match.c: Next atte…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [170] code/trunk/src/pcre2_jit_match.c: Next attempt to fix the previous bug.
Revision: 170
          http://www.exim.org/viewvc/pcre2?view=rev&revision=170
Author:   zherczeg
Date:     2014-11-30 10:05:41 +0000 (Sun, 30 Nov 2014)


Log Message:
-----------
Next attempt to fix the previous bug.

Modified Paths:
--------------
    code/trunk/src/pcre2_jit_match.c


Modified: code/trunk/src/pcre2_jit_match.c
===================================================================
--- code/trunk/src/pcre2_jit_match.c    2014-11-30 10:01:49 UTC (rev 169)
+++ code/trunk/src/pcre2_jit_match.c    2014-11-30 10:05:41 UTC (rev 170)
@@ -139,6 +139,10 @@
   arguments.callout_data = mcontext->callout_data;
   arguments.limit_match = (mcontext->match_limit < re->limit_match)?
     mcontext->match_limit : re->limit_match;
+  if (mcontext->jit_callback != NULL)
+    jit_stack = mcontext->jit_callback(mcontext->jit_callback_data);
+  else
+    jit_stack = (pcre2_jit_stack *)mcontext->jit_callback_data;
   }
 else
   {
@@ -146,6 +150,7 @@
   arguments.callout_data = NULL;
   arguments.limit_match = (MATCH_LIMIT < re->limit_match)?
     MATCH_LIMIT : re->limit_match;
+  jit_stack = NULL;
   }


/* JIT only need two offsets for each ovector entry. Hence
@@ -156,10 +161,6 @@
oveccount = max_oveccount;
arguments.oveccount = oveccount << 1;

-if (mcontext && mcontext->jit_callback != NULL)
- jit_stack = mcontext->jit_callback(mcontext->jit_callback_data);
-else
- jit_stack = (pcre2_jit_stack *)mcontext->jit_callback_data;

convert_executable_func.executable_func = functions->executable_funcs[index];
if (jit_stack != NULL)