[perl #44999] ExtUtils::Constant::ProxySubs not thread-safe
[p5sagit/p5-mst-13.2.git] / pad.c
diff --git a/pad.c b/pad.c
index 51592d0..44fafb6 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -255,8 +255,8 @@ Perl_pad_undef(pTHX_ CV* cv)
        return;
 
     DEBUG_X(PerlIO_printf(Perl_debug_log,
-         "Pad undef: cv=0x%"UVxf" padlist=0x%"UVxf"\n",
-           PTR2UV(cv), PTR2UV(padlist))
+         "Pad undef: cv=0x%"UVxf" padlist=0x%"UVxf" comppad=0x%"UVxf"\n",
+           PTR2UV(cv), PTR2UV(padlist), PTR2UV(PL_comppad))
     );
 
     /* detach any '&' anon children in the pad; if afterwards they
@@ -1501,8 +1501,8 @@ Perl_cv_clone(pTHX_ CV *proto)
                            "Variable \"%s\" is not available", SvPVX_const(namesv));
                    sv = NULL;
                }
-               else {
-                   assert(!SvPADSTALE(sv));
+               /* 'my $x if $y' can leave $x stale even in an active sub */
+               else if (!SvPADSTALE(sv)) {
                    SvREFCNT_inc_simple_void_NN(sv);
                }
            }