From 4bc93fb921ea9f73602571ed903edcead3956e66 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 11 Sep 2014 22:53:42 -0700 Subject: [PATCH 1/1] Use cv_name in pp_hot.c:sub_crush_depth The next commit will allow lexical subs with GVs to reach this code path, so use cv_name, since it knows how to handle those. --- pp_hot.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pp_hot.c b/pp_hot.c index 9e6df2a..2624a71 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2804,17 +2804,8 @@ Perl_sub_crush_depth(pTHX_ CV *cv) if (CvANON(cv)) Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on anonymous subroutine"); else { - HEK *const hek = CvNAME_HEK(cv); - SV *tmpstr; - if (hek) { - tmpstr = sv_2mortal(newSVhek(hek)); - } - else { - tmpstr = sv_newmortal(); - gv_efullname3(tmpstr, CvGV(cv), NULL); - } Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on subroutine \"%"SVf"\"", - SVfARG(tmpstr)); + SVfARG(cv_name(cv,NULL))); } } -- 1.8.3.1