diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-06-20 14:32:15 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-07-25 23:48:00 -0700 |
commit | b479c9f2a3f3a9f9f47dff1a0cb8e53c200796aa (patch) | |
tree | b456f4d87e2d3503a1e2f99704db8d92b55004f5 /pp_hot.c | |
parent | f62e563620351bb8ea82f6d48c141a0ecb32c3b8 (diff) | |
download | perl-b479c9f2a3f3a9f9f47dff1a0cb8e53c200796aa.tar.gz |
[perl #78194] Make sub calls copy pad tmps
before aliasing them to elements of @_.
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2702,7 +2702,6 @@ PP(pp_entersub) } ENTER; - SAVETMPS; retry: if (CvCLONE(cv) && ! CvCLONED(cv)) @@ -2802,12 +2801,18 @@ try_autoload: Copy(MARK,AvARRAY(av),items,SV*); AvFILLp(av) = items - 1; + MARK = AvARRAY(av); while (items--) { if (*MARK) + { + if (SvPADTMP(*MARK) && !IS_PADGV(*MARK)) + *MARK = sv_mortalcopy(*MARK); SvTEMP_off(*MARK); + } MARK++; } } + SAVETMPS; if ((cx->blk_u16 & OPpENTERSUB_LVAL_MASK) == OPpLVAL_INTRO && !CvLVALUE(cv)) DIE(aTHX_ "Can't modify non-lvalue subroutine call"); @@ -2823,6 +2828,7 @@ try_autoload: else { I32 markix = TOPMARK; + SAVETMPS; PUTBACK; if (((PL_op->op_private |