This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
study_chunk: panic on unknown REGNODE_VARIES node
authorHugo van der Sanden <hv@crypt.org>
Mon, 20 Jan 2020 15:37:42 +0000 (15:37 +0000)
committerKarl Williamson <khw@cpan.org>
Mon, 20 Jan 2020 17:25:50 +0000 (10:25 -0700)
This has panicked on DEBUGGING builds since 56fcde2d6ae (August 2013);
as far as I know we've never seen the panic. It is easy to verify the
possible node types with "grep -P '\bV\b' regcomp.sym".

If you ever see this, it'll be because you just changed something wrongly,
or runaway corruption has occurred.

regcomp.c

index 733c13b..2fec913 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -5774,10 +5774,8 @@ Perl_re_printf( aTHX_  "LHS=%" UVuf " RHS=%" UVuf "\n",
                continue;
 
            default:
-#ifdef DEBUGGING
                 Perl_croak(aTHX_ "panic: unexpected varying REx opcode %d",
                                                                     OP(scan));
-#endif
             case REF:
             case CLUMP:
                if (flags & SCF_DO_SUBSTR) {