Skip to content

Commit

Permalink
regcomp.c: Some code paths didn't terminate an inversion list iteration
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
khwilliamson committed Aug 26, 2019
1 parent 1415b48 commit 869e073
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 869e073

Please sign in to comment.