This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Rmv malformed assert()
authorKarl Williamson <khw@cpan.org>
Tue, 20 Nov 2018 15:55:43 +0000 (08:55 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 20 Nov 2018 15:59:24 +0000 (08:59 -0700)
This had a plain '=' instead of an '==', thus setting the value in the
process of asserting it, hence would always be true.  But changing it to
'==' causes the assertion to fail in various cases.

I need to rethink this, so in the meantime am simply removing it.

Spotted by Dave Mitchell++

regcomp.c

index 7ffba08..ddd2752 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -7534,9 +7534,6 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
         goto redo_parse;
     }
 
-    /* In a stable state, as here, this must be true */
-    assert(RExC_size = RExC_emit + 1);
-
     /* Here, we have successfully parsed and generated the pattern's program
      * for the regex engine.  We are ready to finish things up and look for
      * optimizations. */