This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Strengthen the ix zero min-clamping to panic.
[perl5.git] / pp_ctl.c
index a5c29a0..bbd7149 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3098,7 +3098,7 @@ PP(pp_goto) /* also pp_dump */
            I32 oldsave;
 
            if (ix < 0)
-               ix = 0;
+               DIE(aTHX_ "panic: docatch: illegal ix=%ld", (long)ix);
            dounwind(ix);
            TOPBLOCK(cx);
            oldsave = PL_scopestack[PL_scopestack_ix];