diff options
author | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-04-21 15:47:36 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-04-21 15:47:36 +0200 |
commit | 94fa954eaae532928977ae7f7290536783269b6e (patch) | |
tree | eff626a6f644511b62f4c92ae1df5cee84e810e0 /pp.h | |
parent | 73d3d06d86e1eead8f63e5190682ceacbaef8ac1 (diff) | |
download | perl-94fa954eaae532928977ae7f7290536783269b6e.tar.gz |
Fix [perl #74542] 5.12.0 crash on diverse platforms
Filetest ops don't always expect an op on the stack, so we should use
TOPs only if we're sure that we're not stat'ing the _ filehandle.
This is indicated by OPf_KIDS (as checked in ck_ftst).
Diffstat (limited to 'pp.h')
-rw-r--r-- | pp.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -474,7 +474,8 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. #define tryAMAGICftest(chr) \ STMT_START { \ assert(chr != '?'); \ - if (SvAMAGIC(TOPs)) { \ + if ((PL_op->op_flags & OPf_KIDS) \ + && SvAMAGIC(TOPs)) { \ const char tmpchr = (chr); \ SV * const tmpsv = amagic_call(TOPs, \ newSVpvn_flags(&tmpchr, 1, SVs_TEMP), \ |