[pcre-dev] [Bug 1222] Test failures on powerpc-darwin8

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 1222] Test failures on powerpc-darwin8
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1222




--- Comment #18 from Philip Hazel <ph10@???> 2012-04-18 16:41:55 ---
Doh! The bug is in pcretest, not in the library. It is a really, really, stupid
bug and my face is very red. Here is a patch that I believe will fix it. If
this is OK, I'll add some additional code to the library to check for sane
values in the workspace on restart.

--- pcretest.c.ORIG     2012-04-18 16:34:23.000000000 +0100
+++ pcretest.c  2012-04-18 16:36:28.000000000 +0100
@@ -2169,6 +2169,9 @@
 #if !defined NOPOSIX
 int posix = 0;
 #endif
+#if !defined NODFA
+int dfa_workspace[1000];
+#endif
 int debug = 0;
 int done = 0;
 int all_use_dfa = 0;
@@ -3868,12 +3871,11 @@
 #if !defined NODFA
         if (all_use_dfa || use_dfa)
           {
-          int workspace[1000];
           for (i = 0; i < timeitm; i++)
             {
             PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset,
-              (options | g_notempty), use_offsets, use_size_offsets,
workspace,
-              (sizeof(workspace)/sizeof(int)));
+              (options | g_notempty), use_offsets, use_size_offsets,
dfa_workspace,
+              (sizeof(dfa_workspace)/sizeof(int)));
             }
           }
         else
@@ -3939,10 +3941,9 @@
 #if !defined NODFA
       else if (all_use_dfa || use_dfa)
         {
-        int workspace[1000];
         PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset,
-          (options | g_notempty), use_offsets, use_size_offsets, workspace,
-          (sizeof(workspace)/sizeof(int)));
+          (options | g_notempty), use_offsets, use_size_offsets,
dfa_workspace,
+          (sizeof(dfa_workspace)/sizeof(int)));
         if (count == 0)
           {
           fprintf(outfile, "Matched, but too many subsidiary matches\n");
quercite$ 



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email