summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-11-11 21:54:41 -0700
committerKarl Williamson <khw@cpan.org>2018-11-16 10:31:32 -0700
commit3c92e13394fced16c55aca22b7557b6baea486e4 (patch)
tree105d32244422980e3697daa35b1be30fdbd7f839
parent950da19151ab0eeaf8415e508fb51c36f2b5d70c (diff)
downloadperl-3c92e13394fced16c55aca22b7557b6baea486e4.tar.gz
regcomp.c: Add assertion
-rw-r--r--regcomp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 871f4e63ac..b8265a14c9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -7536,6 +7536,9 @@ 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. */