This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv.c: Set phase to CONSTRUCT on interpreter being cloned
authorKarl Williamson <khw@cpan.org>
Thu, 29 Sep 2022 18:33:21 +0000 (12:33 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 18 Oct 2022 12:22:16 +0000 (06:22 -0600)
So far this hadn't been an issue, but it will be for a future commit.

sv.c

diff --git a/sv.c b/sv.c
index a8578b0..13a5ee5 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -15423,6 +15423,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
 
     /* for each stash, determine whether its objects should be cloned */
     S_visit(proto_perl, do_mark_cloneable_stash, SVt_PVHV, SVTYPEMASK);
+    my_perl->Iphase = PERL_PHASE_CONSTRUCT;
     PERL_SET_THX(my_perl);
 
 #ifdef DEBUGGING