summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-23 02:33:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-23 02:33:33 +0000
commite977893f72a0351a07500bd1572c1a12eeedb32c (patch)
tree9dc35574bbb68541fa44bc69997632509211f821 /sv.c
parentc6c38f617234af7b4d0af7bcc5a40ca341bd2234 (diff)
downloadperl-e977893f72a0351a07500bd1572c1a12eeedb32c.tar.gz
fix misplaced OP refcount for eval root
p4raw-id: //depot/perl@5895
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 11e1b111ed..3eebc9ad45 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 */