summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-08-25 18:13:07 -0600
committerKarl Williamson <khw@cpan.org>2019-08-26 09:54:22 -0600
commit869e073ac72c68a1499d9a875c8344aa6b2d66cd (patch)
treec05854ae8516e41efe325863f9c0992b338e065d
parent1415b48ffc957366424380f485fb6a8f97638a26 (diff)
downloadperl-869e073ac72c68a1499d9a875c8344aa6b2d66cd.tar.gz
regcomp.c: Some code paths didn't terminate an inversion list iteration
There were a couple paths through the code that failed to call invlist_iterfinish(). This was a bug everywhere, but prevented z/OS from completely compiling.
-rw-r--r--regcomp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index b2cc6672cb..2eba109dba 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -18890,7 +18890,6 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
full_cp_count += this_end - this_start + 1;
}
- invlist_iterfinish(cp_list);
/* At the end of the loop, we count how many bits differ from
* the bits in lowest code point, call the count 'd'. If the
@@ -18919,8 +18918,10 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
ret = reganode(pRExC_state, op, lowest_cp);
FLAGS(REGNODE_p(ret)) = ANYOFM_mask;
}
+
+ done_anyofm:
+ invlist_iterfinish(cp_list);
}
- done_anyofm:
if (inverted) {
_invlist_invert(cp_list);