fix for PMOP threadness failures
Artur Bergman [Thu, 12 Jul 2001 09:48:06 +0000 (11:48 +0200)]
Message-ID: <B77322D6.22DD%artur@contiller.se>

p4raw-id: //depot/perl@11299

regexec.c

index b5f8f47..0e780d0 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1850,8 +1850,17 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
            PL_reg_oldpos   = mg->mg_len;
            SAVEDESTRUCTOR_X(restore_pos, 0);
         }
-       if (!PL_reg_curpm)
+        if (!PL_reg_curpm) {
            Newz(22,PL_reg_curpm, 1, PMOP);
+#ifdef USE_ITHREADS
+            {
+                SV* repointer = newSViv(0);
+                av_push(PL_regex_padav,repointer);
+                PL_reg_curpm->op_pmoffset = av_len(PL_regex_padav);
+                PL_regex_pad = AvARRAY(PL_regex_padav);
+            }
+#endif      
+        }
        PM_SETRE(PL_reg_curpm, prog);
        PL_reg_oldcurpm = PL_curpm;
        PL_curpm = PL_reg_curpm;