diff options
author | David Mitchell <davem@iabyn.com> | 2010-10-19 23:13:07 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-10-19 23:29:25 +0100 |
commit | f837477cd1460eda104bacd7f162d25d5254563d (patch) | |
tree | d22d9426662fc26e53a96c08a4166f1391d8b069 /cop.h | |
parent | 9c540340879062c71c21eaf596d6df60630d5bb2 (diff) | |
download | perl-f837477cd1460eda104bacd7f162d25d5254563d.tar.gz |
Recursive MULTICALL prematurely freed CV
See [perl #78070].
Basically, POPSUB/LEAVESUB had a mechanism to decrement the reference
count of the CV only at CvDEPTH==1; POP_MULTICALL was decrementing it at
all depths.
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -928,8 +928,8 @@ See L<perlcall/Lightweight Callbacks>. #define POP_MULTICALL \ STMT_START { \ - LEAVESUB(multicall_cv); \ - CvDEPTH(multicall_cv)--; \ + if (! --CvDEPTH(multicall_cv)) \ + LEAVESUB(multicall_cv); \ POPBLOCK(cx,PL_curpm); \ POPSTACK; \ CATCH_SET(multicall_oldcatch); \ |