In pp_entersub, accept to handle a CV with a NULL padlist.
Rafael Garcia-Suarez [Thu, 20 Jul 2006 22:03:59 +0000 (22:03 +0000)]
This fixes a crash with mod_perl 1.29.

p4raw-id: //depot/perl@28603

pp_hot.c

index 546d93c..fb0a98d 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2825,12 +2825,14 @@ try_autoload:
         * Owing the speed considerations, we choose instead to search for
         * the cv using find_runcv() when calling doeval().
         */
-       if (CvDEPTH(cv) >= 2) {
-           PERL_STACK_OVERFLOW_CHECK();
-           pad_push(padlist, CvDEPTH(cv));
+       if (padlist) {
+           if (CvDEPTH(cv) >= 2) {
+               PERL_STACK_OVERFLOW_CHECK();
+               pad_push(padlist, CvDEPTH(cv));
+           }
+           SAVECOMPPAD();
+           PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv));
        }
-       SAVECOMPPAD();
-       PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv));
        if (hasargs)
        {
            AV* const av = (AV*)PAD_SVl(0);