CvPADLIST can be NULL, which would segv NAMECNT
authorPeter Martini <PeterCMartini@GMail.com>
Tue, 16 Oct 2012 17:09:13 +0000 (13:09 -0400)
committerPeter Martini <PeterCMartini@GMail.com>
Wed, 17 Oct 2012 20:36:17 +0000 (16:36 -0400)
I'm not sure why it's NULL - will have to revisit

pp_ctl.c

index 6e00b43..e59b700 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2828,7 +2828,8 @@ PP(pp_goto)
            }
            else if (CxMULTICALL(cx))
                DIE(aTHX_ "Can't goto subroutine from a sort sub (or similar callback)");
-           if (CxTYPE(cx) == CXt_SUB && PadlistNAMECNT(CvPADLIST(cv)))
+           /* XXX TODO: Why would CvPADLIST be null? */
+           if (CxTYPE(cx) == CXt_SUB && CvPADLIST(cv) && PadlistNAMECNT(CvPADLIST(cv)))
                DIE(aTHX_ "Can't goto into a sub with signatures");
            else if (CxTYPE(cx) == CXt_SUB && CxHASARGS(cx)) {
                /* put @_ back onto stack */