Change 32942 by [EMAIL PROTECTED] on 2008/01/10 23:32:27

        Change 32899 missed undoing the reference count increase when the SV
        is popped off the AV.
        "There's Something Wrong with our Bloody Leak Checking Today", as
        Beattie didn't put it. It seems that we really can't check for leaking
        scalars in perl_destruct, because we do our damndest to free them
        brute force, rather than by undefining the symbol table and seeing
        what sticks around.

Affected files ...

... //depot/perl/op.c#978 edit

Differences ...

==== //depot/perl/op.c#978 (text) ====
Index: perl/op.c
--- perl/op.c#977~32902~        2008-01-08 09:55:41.000000000 -0800
+++ perl/op.c   2008-01-10 15:32:27.000000000 -0800
@@ -3368,8 +3368,12 @@
 #ifdef USE_ITHREADS
     if (av_len((AV*) PL_regex_pad[0]) > -1) {
        SV * const repointer = av_pop((AV*)PL_regex_pad[0]);
-       pmop->op_pmoffset = SvIV(repointer);
+       const IV offset = SvIV(repointer);
+       pmop->op_pmoffset = offset;
        sv_setiv(repointer,0);
+       assert(repointer == PL_regex_pad[offset]);
+       /* One reference remains, in PL_regex_pad[offset]  */
+       SvREFCNT_dec(repointer);
     } else {
        SV * const repointer = newSViv(0);
        av_push(PL_regex_padav, repointer);
End of Patch.

Reply via email to