From 3c92e13394fced16c55aca22b7557b6baea486e4 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 11 Nov 2018 21:54:41 -0700 Subject: [PATCH 1/1] regcomp.c: Add assertion --- regcomp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/regcomp.c b/regcomp.c index 871f4e6..b8265a1 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. */ -- 1.8.3.1