]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commit
Preserve PL_scopestack[cx->blk_oldscopesp - 1] in su_pop()
authorVincent Pit <vince@profvince.com>
Fri, 27 Mar 2015 18:47:42 +0000 (15:47 -0300)
committerVincent Pit <vince@profvince.com>
Fri, 27 Mar 2015 18:47:42 +0000 (15:47 -0300)
commit97dc8ef80311dba0ff5058c2ee54caa8193b5c51
tree170930f2a6164c4352f35d92b6bfee0fcbe7800f
parent9aba07492fcdd1ac92533eddc90efb524d3777df
Preserve PL_scopestack[cx->blk_oldscopesp - 1] in su_pop()

Starting from perl 5.19.4 commit 2537512, pp_leavesub does a second
leave_scope(PL_scopestack[cx->blk_oldscopesp - 1]) just after the usual
LEAVE call. However, this index in the scope stack may be overwritten
by our own "flush" leave_scope() call in su_pop(). More precisely, this
seems to happen in sv_clear() (called from sv_free2() called from
sv_unref_flags() called from sv_force_normal_flags() called from
leave_scope()) and only when the debugger is enabled.
Upper.xs