summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-10-13 03:32:02 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-10-13 03:32:02 +0000
commit4a925ff6e0a016ce4f2615607e10674d0b0eb2ef (patch)
treee56ad6e58f6d1de165b95cc3a759ed02fddc92c0 /pp_hot.c
parent6b35e00972a13cc3d5e641e82fd498a9d9f6a324 (diff)
downloadperl-4a925ff6e0a016ce4f2615607e10674d0b0eb2ef.tar.gz
defer "deep recursion" warnings until CXt_SUB context is properly
set up p4raw-id: //depot/perl@1945
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index f513c12fa2..859dcfb2ed 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2281,9 +2281,6 @@ PP(pp_entersub)
if (CvDEPTH(cv) < 2)
(void)SvREFCNT_inc(cv);
else { /* save temporaries on recursion? */
- if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION)
- && !(PERLDB_SUB && cv == GvCV(PL_DBsub)))
- sub_crush_depth(cv);
if (CvDEPTH(cv) > AvFILLp(padlist)) {
AV *av;
AV *newpad = newAV();
@@ -2383,6 +2380,13 @@ PP(pp_entersub)
MARK++;
}
}
+ /* warning must come *after* we fully set up the context
+ * stuff so that __WARN__ handlers can safely dounwind()
+ * if they want to
+ */
+ if (CvDEPTH(cv) == 100 && ckWARN(WARN_RECURSION)
+ && !(PERLDB_SUB && cv == GvCV(PL_DBsub)))
+ sub_crush_depth(cv);
#if 0
DEBUG_S(PerlIO_printf(PerlIO_stderr(),
"%p entersub returning %p\n", thr, CvSTART(cv)));