diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-23 10:41:00 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-23 10:41:00 +0000 |
commit | 17fbfdf6c6f5ee46c01833862a16cddc094c4bd5 (patch) | |
tree | b190c40ee312f29f1123af1c21df9c594ab55429 /perl.c | |
parent | 5fe61d939e01ff04c0119f3d65341fdc7d48769a (diff) | |
download | perl-17fbfdf6c6f5ee46c01833862a16cddc094c4bd5.tar.gz |
Re-initialise PL_curcop to &PL_compiling before destroying the optree.
p4raw-id: //depot/perl@24952
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -507,6 +507,11 @@ perl_destruct(pTHXx) /* We must account for everything. */ /* Destroy the main CV and syntax tree */ + /* Do this now, because destroying ops can cause new SVs to be generated + in Perl_pad_swipe, and when running with -DDEBUG_LEAKING_SCALARS they + PL_curcop to point to a valid op from which the filename structure + member is copied. */ + PL_curcop = &PL_compiling; if (PL_main_root) { /* ensure comppad/curpad to refer to main's pad */ if (CvPADLIST(PL_main_cv)) { @@ -515,7 +520,6 @@ perl_destruct(pTHXx) op_free(PL_main_root); PL_main_root = Nullop; } - PL_curcop = &PL_compiling; PL_main_start = Nullop; SvREFCNT_dec(PL_main_cv); PL_main_cv = Nullcv; |