summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-10-17 23:13:44 +0200
committerYves Orton <demerphq@gmail.com>2016-10-19 13:28:52 +0200
commitacfafe8c681b05c76e0a74ef6663970c491cbf50 (patch)
treed8043b52c9053604279bee680a3c0dc7cd9dbacc /regexec.c
parent2c27f131241beb434fcd2e4d3c6e9314506513c0 (diff)
downloadperl-acfafe8c681b05c76e0a74ef6663970c491cbf50.tar.gz
regexec.c: add comment and add a test
The test is from the existing comment.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/regexec.c b/regexec.c
index cae8a19f26..0da34af4ff 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3615,6 +3615,14 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startposp)
* above-mentioned test suite tests to succeed. The common theme
* on those tests seems to be returning null fields from matches.
* --jhi updated by dapm */
+
+ /* After encountering a variant of the issue mentioned above I think
+ * the point Ilya was making is that if we properly unwind whenever
+ * we set lastparen to a smaller value then we should not need to do
+ * this every time, only when needed. So if we have tests that fail if
+ * we remove this, then it suggests somewhere else we are improperly
+ * unwinding the lastparen/paren buffers. See UNWIND_PARENS() and
+ * places it is called, and related regcp() routines. - Yves */
#if 1
if (prog->nparens) {
regexp_paren_pair *pp = prog->offs;