[ 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..)
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);
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. */