summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-11-02 17:24:35 +0000
committerNicholas Clark <nick@ccl4.org>2005-11-02 17:24:35 +0000
commitd7f0a2f48cb0be80a2bdbd31222d42d9addef98b (patch)
tree98369b9130211656310583aca14c674b2d43ecd8 /pp_sys.c
parent4992681b5f41367f309b397b0b26b5b9cea591b8 (diff)
downloadperl-d7f0a2f48cb0be80a2bdbd31222d42d9addef98b.tar.gz
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
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 3f0a25ba35..98c734842b 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);