diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-10 13:21:37 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-12 03:09:58 +0000 |
commit | f46d017c815b0d11f074ad6c16247c01f8af2ece (patch) | |
tree | b47db1bbab27e93a3f24e5114c769c4c8ebe7351 /pp_ctl.c | |
parent | 301d9039fb19ffce344369e333240632e80d95d5 (diff) | |
download | perl-f46d017c815b0d11f074ad6c16247c01f8af2ece.tar.gz |
[win32] fix extra LEAVE when require fails
Message-Id: <199802102321.SAA15346@aatma.engin.umich.edu>
Subject: Re: evals and requires make seg-fault with bad require file
p4raw-id: //depot/win32/perl@498
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -2629,6 +2629,7 @@ PP(pp_leaveeval) assert(CvDEPTH(compcv) == 1); #endif CvDEPTH(compcv) = 0; + lex_end(); if (optype == OP_REQUIRE && !(gimme == G_SCALAR ? SvTRUE(*sp) : sp > newsp)) @@ -2637,13 +2638,13 @@ PP(pp_leaveeval) char *name = cx->blk_eval.old_name; (void)hv_delete(GvHVn(incgv), name, strlen(name), G_DISCARD); retop = die("%s did not return a true value", name); + /* die_where() did LEAVE, or we won't be here */ + } + else { + LEAVE; + if (!(save_flags & OPf_SPECIAL)) + sv_setpv(ERRSV,""); } - - lex_end(); - LEAVE; - - if (!(save_flags & OPf_SPECIAL)) - sv_setpv(ERRSV,""); RETURNOP(retop); } |