[patch] undef &xsub for 1,2
Doug MacEachern [Mon, 9 Jul 2001 20:16:49 +0000 (13:16 -0700)]
Message-ID: <Pine.LNX.4.21.0107092012570.1913-100000@mako.covalent.net>

(This version of the patch with a comment from Gisle.)

p4raw-id: //depot/perl@11258

op.c

diff --git a/op.c b/op.c
index baa62fb..eba79ef 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4165,9 +4165,10 @@ Perl_cv_undef(pTHX_ CV *cv)
 
 #ifdef USE_ITHREADS
     if (CvFILE(cv) && !CvXSUB(cv)) {
+       /* for XSUBs CvFILE point directly to static memory; __FILE__ */
        Safefree(CvFILE(cv));
-       CvFILE(cv) = 0;
     }
+    CvFILE(cv) = 0;
 #endif
 
     if (!CvXSUB(cv) && CvROOT(cv)) {