From: Rafael Garcia-Suarez Date: Thu, 20 Jul 2006 22:03:59 +0000 (+0000) Subject: In pp_entersub, accept to handle a CV with a NULL padlist. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=56930b20d32463989774eccb7de3dc7d7282b17a;p=p5sagit%2Fp5-mst-13.2.git In pp_entersub, accept to handle a CV with a NULL padlist. This fixes a crash with mod_perl 1.29. p4raw-id: //depot/perl@28603 --- diff --git a/pp_hot.c b/pp_hot.c index 546d93c..fb0a98d 100644 --- 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);