summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-01-20 00:16:42 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-01-20 00:16:42 +0000
commitb36bdecab13f885c556206f71bfc47083b33107e (patch)
treecf1e451df96791b01c3da200598c5312387dbbcc /pp_hot.c
parent1bf2966364b6356e9050b17d8920dd4a8ce27d97 (diff)
downloadperl-b36bdecab13f885c556206f71bfc47083b33107e.tar.gz
second attempt to fix [perl #24914] freeing a CV reference that was
currently being executed caused coredumps. The dounwind called by die unwinds all the contexts on the context stack before unwinding the save stack. To stop premature freeing of the CV, hold references to it on both stacks. p4raw-id: //depot/perl@22182
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 208d89b2c3..1874a14529 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2663,9 +2663,7 @@ PP(pp_entersub)
* Owing the speed considerations, we choose instead to search for
* the cv using find_runcv() when calling doeval().
*/
- if (CvDEPTH(cv) < 2)
- (void)SvREFCNT_inc(cv);
- else {
+ if (CvDEPTH(cv) >= 2) {
PERL_STACK_OVERFLOW_CHECK();
pad_push(padlist, CvDEPTH(cv), 1);
}