diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-07-02 01:49:11 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-07-02 01:49:11 +0000 |
commit | 8b7059b1a993d7ac934442e99623d9dbc5fe3ce8 (patch) | |
tree | 7103d4613a669489d661dc301f5e71e1f13f4129 /scope.c | |
parent | 6f980a54574e0bf71b1f27e663d5e95cbb8a2612 (diff) | |
download | perl-8b7059b1a993d7ac934442e99623d9dbc5fe3ce8.tar.gz |
[perl #30258] utf8 POPSTACK crash on split execution
split() does a SWITCHSTACK to directly split to an array, but
if it subsequently dies (eg the regex triggers a 'use utf8' which
is then denied by Safe), then the switch doesn't get undone. Add
a new save type to allow for this.
p4raw-id: //depot/perl@23023
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1063,6 +1063,15 @@ Perl_leave_scope(pTHX_ I32 base) AvARRAY((PAD*)ptr)[off] = (SV*)SSPOPPTR; } break; + case SAVEt_SAVESWITCHSTACK: + { + dSP; + AV* t = (AV*)SSPOPPTR; + AV* f = (AV*)SSPOPPTR; + SWITCHSTACK(t,f); + PL_curstackinfo->si_stack = f; + } + break; case SAVEt_SET_SVFLAGS: { U32 val = (U32)SSPOPINT; |