This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Scalar leaked in 'local $0' under ithreads + taint mode
authorSteve Hay <SteveHay@planit.com>
Mon, 11 Jul 2005 13:29:37 +0000 (14:29 +0100)
committerSteve Hay <SteveHay@planit.com>
Tue, 12 Jul 2005 13:19:51 +0000 (13:19 +0000)
Message-ID: <42D26631.1070500@uk.radan.com>

p4raw-id: //depot/perl@25123

sv.c

diff --git a/sv.c b/sv.c
index 3d17b1d..4e25290 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -11373,6 +11373,10 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
 
     param->stashes      = newAV();  /* Setup array of objects to call clone on */
 
+    /* Set tainting stuff before PerlIO_debug can possibly get called */
+    PL_tainting                = proto_perl->Itainting;
+    PL_taint_warn      = proto_perl->Itaint_warn;
+
 #ifdef PERLIO_LAYERS
     /* Clone PerlIO tables as soon as we can handle general xx_dup() */
     PerlIO_clone(aTHX_ proto_perl, param);
@@ -11494,8 +11498,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_fdpid           = av_dup_inc(proto_perl->Ifdpid, param);
 
     /* internal state */
-    PL_tainting                = proto_perl->Itainting;
-    PL_taint_warn       = proto_perl->Itaint_warn;
     PL_maxo            = proto_perl->Imaxo;
     if (proto_perl->Iop_mask)
        PL_op_mask      = SAVEPVN(proto_perl->Iop_mask, PL_maxo);