This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorNicholas Clark <nick@ccl4.org>
Mon, 13 Feb 2006 15:32:10 +0000 (15:32 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 13 Feb 2006 15:32:10 +0000 (15:32 +0000)
[ 27133]
lastparen in the regexp structure is never initialised, and so will
still be uninitialised after a failed match, yet various points in
mg.c read it come what may. Should fix bug 38461.

[ 27169]
All the bits of clone_params.flags need to be initialised, not just
CLONEf_JOIN_IN.
p4raw-link: @27169 on //depot/perl: 3ae345e35a0fa71a6a704dcc7c7f9ff029895bcd
p4raw-link: @27133 on //depot/perl: 38d1b06f95ebaf0e4dc96d48047c7c7648c3ba3f

p4raw-id: //depot/maint-5.8/perl@27170
p4raw-integrated: from //depot/perl@27168 'merge in'
ext/threads/threads.xs (@26675..)
p4raw-integrated: from //depot/perl@27133 'merge in' regcomp.c
(@26764..)

ext/threads/threads.xs
regcomp.c

index baf1b51..252d0e7 100755 (executable)
@@ -623,7 +623,7 @@ Perl_ithread_join(pTHX_ SV *obj)
          PerlInterpreter *other_perl = thread->interp;
          CLONE_PARAMS clone_params;
          clone_params.stashes = newAV();
-         clone_params.flags |= CLONEf_JOIN_IN;
+         clone_params.flags = CLONEf_JOIN_IN;
          PL_ptr_table = ptr_table_new();
          current_thread = Perl_ithread_get(aTHX);
          Perl_ithread_set(aTHX_ thread);
index add0a53..785a189 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1810,6 +1810,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm)
     r->subbeg = NULL;
     r->reganch = pm->op_pmflags & PMf_COMPILETIME;
     r->nparens = RExC_npar - 1;        /* set early to validate backrefs */
+    r->lastparen = 0;                  /* mg.c reads this.  */
 
     r->substrs = 0;                    /* Useful during FAIL. */
     r->startp = 0;                     /* Useful during FAIL. */