This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
950da19
)
regcomp.c: Add assertion
author
Karl Williamson
<khw@cpan.org>
Mon, 12 Nov 2018 04:54:41 +0000
(21:54 -0700)
committer
Karl Williamson
<khw@cpan.org>
Fri, 16 Nov 2018 17:31:32 +0000
(10:31 -0700)
regcomp.c
patch
|
blob
|
blame
|
history
diff --git
a/regcomp.c
b/regcomp.c
index
871f4e6
..
b8265a1
100644
(file)
--- 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. */