From: Nicholas Clark Date: Mon, 30 Oct 2006 18:37:41 +0000 (+0000) Subject: Avoid Devel::DProf failing an assertion during global destruction. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=93fec93b7d98eb18b84317351ccfa1bbd271ec21;p=p5sagit%2Fp5-mst-13.2.git Avoid Devel::DProf failing an assertion during global destruction. p4raw-id: //depot/perl@29165 --- diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs index 6ce8e52..57e0084 100644 --- a/ext/Devel/DProf/DProf.xs +++ b/ext/Devel/DProf/DProf.xs @@ -370,9 +370,13 @@ prof_mark(pTHX_ opcode ptype) CV * const cv = db_get_cv(aTHX_ Sub); GV * const gv = CvGV(cv); - pname = GvSTASH(gv) ? HvNAME_get(GvSTASH(gv)) : NULL; - pname = pname ? pname : (char *) "(null)"; - gname = GvNAME(gv); + if (isGV_with_GP(gv)) { + pname = GvSTASH(gv) ? HvNAME_get(GvSTASH(gv)) : NULL; + pname = pname ? pname : (char *) "(null)"; + gname = GvNAME(gv); + } else { + gname = pname = (char *) "(null)"; + } set_cv_key(aTHX_ cv, pname, gname); svp = hv_fetch(g_cv_hash, SvPVX_const(g_key_hash), SvCUR(g_key_hash), TRUE);