diff options
author | Lukas Mai <l.mai@web.de> | 2013-06-18 09:51:32 +0200 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-06-18 06:22:08 -0700 |
commit | 07b2687d22462e599adb759b7c0082fb12b3f33d (patch) | |
tree | a4ae3bf6ace6feddf89135f0a4cf0532b4ca25e7 /pp_hot.c | |
parent | 6daa8d508141a8730166526fd60c532162680a2f (diff) | |
download | perl-07b2687d22462e599adb759b7c0082fb12b3f33d.tar.gz |
don't crash on deep recursion warnings in lexical subs (#118521)
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -2895,8 +2895,15 @@ Perl_sub_crush_depth(pTHX_ CV *cv) if (CvANON(cv)) Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on anonymous subroutine"); else { - SV* const tmpstr = sv_newmortal(); - gv_efullname3(tmpstr, CvGV(cv), NULL); + 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)); } |