diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-06-08 00:11:23 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-06-08 00:14:12 -0700 |
commit | cb1ad50e615d49477a97593b9e0569e7167a258e (patch) | |
tree | 365f091a08591bfa2a6b9331aeb60e9dee3a1879 /pp_ctl.c | |
parent | dcdfe746ecfff81cc2793db4e7fdfe25be590e0b (diff) | |
download | perl-cb1ad50e615d49477a97593b9e0569e7167a258e.tar.gz |
[perl #117941] eval crashes when current stash is freed
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3402,7 +3402,9 @@ S_doeval(pTHX_ int gimme, CV* outside, U32 seq, HV *hh) if (CopSTASH_ne(PL_curcop, PL_curstash)) { SAVEGENERICSV(PL_curstash); - PL_curstash = (HV *)SvREFCNT_inc_simple(CopSTASH(PL_curcop)); + PL_curstash = (HV *)CopSTASH(PL_curcop); + if (SvTYPE(PL_curstash) != SVt_PVHV) PL_curstash = NULL; + else SvREFCNT_inc_simple_void(PL_curstash); } /* XXX:ajgo do we really need to alloc an AV for begin/checkunit */ SAVESPTR(PL_beginav); |