From: Gurusamy Sarathy Date: Thu, 23 Mar 2000 02:33:33 +0000 (+0000) Subject: fix misplaced OP refcount for eval root X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e977893f72a0351a07500bd1572c1a12eeedb32c;p=p5sagit%2Fp5-mst-13.2.git fix misplaced OP refcount for eval root p4raw-id: //depot/perl@5895 --- diff --git a/sv.c b/sv.c index 11e1b11..3eebc9a 100644 --- a/sv.c +++ b/sv.c @@ -7106,6 +7106,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl) char *c; void (*dptr) (void*); void (*dxptr) (pTHXo_ void*); + OP *o; Newz(54, nss, max, ANY); @@ -7232,7 +7233,9 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl) case OP_LEAVE: case OP_SCOPE: case OP_LEAVEWRITE: - TOPPTR(nss,ix) = any_dup(ptr, proto_perl); + TOPPTR(nss,ix) = ptr; + o = (OP*)ptr; + OpREFCNT_inc(o); break; default: TOPPTR(nss,ix) = Nullop; @@ -7575,7 +7578,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_main_cv = cv_dup_inc(proto_perl->Imain_cv); PL_main_root = OpREFCNT_inc(proto_perl->Imain_root); PL_main_start = proto_perl->Imain_start; - PL_eval_root = OpREFCNT_inc(proto_perl->Ieval_root); + PL_eval_root = proto_perl->Ieval_root; PL_eval_start = proto_perl->Ieval_start; /* runtime control stuff */