summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1999-08-14 09:20:58 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1999-08-14 09:20:58 +0000
commita7c6d24429ab2b6db54575a3bdc62c7ed9f881cf (patch)
tree7d35f0d7ea024de4150a892601d0a84bcd7d1c59 /util.c
parent7e291ef107a151a0b630a8ce85d6a562438da741 (diff)
downloadperl-a7c6d24429ab2b6db54575a3bdc62c7ed9f881cf.tar.gz
New lightweight Carp has a require. If Carp is used in a __DIE__ handler
this causes a POPSTACK panic. The problem seems to be that although die_where() has unwound the tail of perl_vdie() top_env setjmp has been set to resume execution there. Avoiding setting CATCH_SET(TRUE) in call_sv() avoids this. So invent a new G_NOCATCH flag to disable messing with CATCH_SET() in call_sv, use it in perl_vdie(). Add test to op/eval.t which will fail (panic) if bug comes back. >>> I AM NOT CONVINCED THIS IS CORRECT LONG TERM FIX <<< p4raw-id: //depot/perl@3988
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/util.c b/util.c
index 132ec5e127..715a5f1a15 100644
--- a/util.c
+++ b/util.c
@@ -1491,7 +1491,11 @@ Perl_vdie(pTHX_ const char* pat, va_list *args)
PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
- call_sv((SV*)cv, G_DISCARD);
+ /* HACK - REVISIT - avoid CATCH_SET(TRUE) in call_sv()
+ or we come back here due to a JMPENV_JMP() and do
+ a POPSTACK - but die_where() will have already done
+ one as it unwound - NI-S 1999/08/14 */
+ call_sv((SV*)cv, G_DISCARD|G_NOCATCH);
POPSTACK;
LEAVE;
}