diff options
author | Chip Salzenberg <chip@atlantic.net> | 1997-01-28 23:11:15 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-01-29 18:11:00 +1200 |
commit | 1ca7b98ad174fbe71cdc4e5666d8b6784b21f767 (patch) | |
tree | 41a69c47951a7ad14ed58f149e9cc7129cd21e07 /pp_hot.c | |
parent | 8a019ce79d3f6edbd72a4f740238e43eaea4945e (diff) | |
download | perl-1ca7b98ad174fbe71cdc4e5666d8b6784b21f767.tar.gz |
Prevent premature death of @_ during leavesub
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1656,7 +1656,7 @@ PP(pp_leavesub) register CONTEXT *cx; POPBLOCK(cx,newpm); - POPSUB(cx); + /* Delay POPSUB until stack values are safe */ if (gimme == G_SCALAR) { MARK = newsp + 1; @@ -1678,6 +1678,9 @@ PP(pp_leavesub) /* in case LEAVE wipes old return values */ } + /* Now that stack values are safe, release CV and @_ */ + POPSUB(cx); + curpm = newpm; /* Don't pop $1 et al till now */ LEAVE; |