From: Nicholas Clark Date: Wed, 2 Nov 2005 17:24:35 +0000 (+0000) Subject: Avoid a pad panic by attempting to use dTARGET; in an op that didn't X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7f0a2f48cb0be80a2bdbd31222d42d9addef98b;p=p5sagit%2Fp5-mst-13.2.git Avoid a pad panic by attempting to use dTARGET; in an op that didn't flag that it needed a target (OP_FTIS) p4raw-id: //depot/perl@25960 --- diff --git a/pp_sys.c b/pp_sys.c index 3f0a25b..98c7348 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -3046,17 +3046,20 @@ PP(pp_fteexec) PP(pp_ftis) { I32 result; + const int op_type = PL_op->op_type; dSP; STACKED_FTEST_CHECK; result = my_stat(); SPAGAIN; if (result < 0) RETPUSHUNDEF; + if (op_type == OP_FTIS) + RETPUSHYES; { + /* You can't dTARGET inside OP_FTIS, because you'll get + "panic: pad_sv po" - the op is not flagged to have a target. */ dTARGET; - switch (PL_op->op_type) { - case OP_FTIS: - RETPUSHYES; + switch (op_type) { case OP_FTSIZE: #if Off_t_size > IVSIZE PUSHn(PL_statcache.st_size);