This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Change message into a panic
authorKarl Williamson <khw@cpan.org>
Mon, 26 Aug 2019 15:15:09 +0000 (09:15 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 26 Aug 2019 15:54:22 +0000 (09:54 -0600)
Because that's what is happening, and the next commit would otherwise
say we need to document this diagnostic, but it's one that the observer
can do nothing about except file a bug report

regcomp.c

index baf38b5..e14295f 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -20274,7 +20274,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
     if (OP(o) > REGNODE_MAX)           /* regnode.type is unsigned */
        /* It would be nice to FAIL() here, but this may be called from
           regexec.c, and it would be hard to supply pRExC_state. */
-       Perl_croak(aTHX_ "Corrupted regexp opcode %d > %d",
+        Perl_croak(aTHX_ "panic: corrupted regexp opcode %d > %d",
                                               (int)OP(o), (int)REGNODE_MAX);
     sv_catpv(sv, PL_reg_name[OP(o)]); /* Take off const! */