diff options
author | David Mitchell <davem@iabyn.com> | 2015-12-25 22:03:10 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 09:19:17 +0000 |
commit | d77cab044d85b109271a8fd3f99e99ac1392a029 (patch) | |
tree | 5bd72bd08c366316584b529f0ff43bc57cb8d774 /cop.h | |
parent | d9203e036f608afd529c54a69f854a528171f784 (diff) | |
download | perl-d77cab044d85b109271a8fd3f99e99ac1392a029.tar.gz |
MULTICALL should clear scope after each call
RT #116577
Lexicals etc were only being freed at the end of the MULTICALL, not
after each individual call to the sub.
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1327,6 +1327,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>. CV *multicall_cv; \ OP *multicall_cop; \ bool multicall_oldcatch; \ + I32 saveix_floor; \ U8 hasargs = 0 /* used by PUSHSUB */ #define PUSH_MULTICALL(the_cv) \ @@ -1347,6 +1348,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>. PUSHSUB(cx); \ cx->blk_oldsaveix = PL_savestack_ix; \ SAVEVPTR(PL_op); \ + saveix_floor = PL_savestack_ix; \ if (!(flags & CXp_SUB_RE_FAKE)) \ CvDEPTH(cv)++; \ if (CvDEPTH(cv) >= 2) { \ @@ -1363,6 +1365,8 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>. STMT_START { \ PL_op = multicall_cop; \ CALLRUNOPS(aTHX); \ + cx = CX_CUR(); \ + LEAVE_SCOPE(saveix_floor); \ } STMT_END #define POP_MULTICALL \ |