This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PL_scopestack_name needs to be copied in perl_clone()
authorJan Dubois <jand@activestate.com>
Fri, 13 Nov 2009 01:03:56 +0000 (17:03 -0800)
committerJan Dubois <jand@activestate.com>
Fri, 13 Nov 2009 01:05:57 +0000 (17:05 -0800)
sv.c

diff --git a/sv.c b/sv.c
index 2bb6f11..45248db 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -11785,6 +11785,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_curcop = NULL;
     PL_markstack = 0;
     PL_scopestack = 0;
+    PL_scopestack_name = 0;
     PL_savestack = 0;
     PL_savestack_ix = 0;
     PL_savestack_max = -1;
@@ -11823,6 +11824,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_curcop = NULL;
     PL_markstack = 0;
     PL_scopestack = 0;
+    PL_scopestack_name = 0;
     PL_savestack = 0;
     PL_savestack_ix = 0;
     PL_savestack_max = -1;
@@ -12284,6 +12286,10 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
        Newxz(PL_scopestack, PL_scopestack_max, I32);
        Copy(proto_perl->Iscopestack, PL_scopestack, PL_scopestack_ix, I32);
 
+#ifdef DEBUGGING
+       Newxz(PL_scopestack_name, PL_scopestack_max, const char *);
+       Copy(proto_perl->Iscopestack_name, PL_scopestack_name, PL_scopestack_ix, const char *);
+#endif
        /* NOTE: si_dup() looks at PL_markstack */
        PL_curstackinfo         = si_dup(proto_perl->Icurstackinfo, param);