diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-10-08 04:15:29 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-10-08 04:15:29 +0000 |
commit | 9a2031270d44204ce5f6c2c6c8bb52d0df0b6911 (patch) | |
tree | 6c7d350676c43367dc981b08deaf9e8bd89b980f /pp_ctl.c | |
parent | 45d2de233d283040e1a0f6bad0ab22425d1e8b6d (diff) | |
download | perl-9a2031270d44204ce5f6c2c6c8bb52d0df0b6911.tar.gz |
save_re_context() could reset PL_curcop to freed memory, causing core
dumps in code such as C<use CGI::Carp; use something_that_calls_die;>
p4raw-id: //depot/perl@7165
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1417,6 +1417,12 @@ Perl_die_where(pTHX_ char *message, STRLEN msglen) LEAVE; + /* LEAVE could clobber PL_curcop (see save_re_context()) + * XXX it might be better to find a way to avoid messing with + * PL_curcop in save_re_context() instead, but this is a more + * minimal fix --GSAR */ + PL_curcop = cx->blk_oldcop; + if (optype == OP_REQUIRE) { char* msg = SvPVx(ERRSV, n_a); DIE(aTHX_ "%sCompilation failed in require", |