Revert an unintended change in JIT repeat detection. (#58)

Co-authored-by: Zoltan Herczeg <hzmester@freemail.hu>
This commit is contained in:
Zoltan Herczeg 2021-11-24 17:58:30 +01:00 committed by GitHub
parent eb42305f07
commit d144199dfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,8 @@ in pcre2grep with buffered fseek(stdin).
3. Merged patch from @carenas (GitHub #37, acc520924) to fix tests when -S is
not supported.
4. Revert an unintended change in JIT repeat detection.
Version 10.39 29-October-2021
-----------------------------

View File

@ -1621,7 +1621,7 @@ if (end[-(1 + LINK_SIZE)] != OP_KET || PRIVATE_DATA(begin) != 0)
/* /(?:AB){4,6}/ is currently converted to /(?:AB){3}(?AB){1,3}/
* Skip the check of the second part. */
if (PRIVATE_DATA(end - LINK_SIZE) == 0)
if (PRIVATE_DATA(end - LINK_SIZE) != 0)
return TRUE;
next = end;

View File

@ -291,6 +291,7 @@ static struct regression_test_case regression_test_cases[] = {
{ MU, A, 0, 0, "(a(?:bc|cb|b|c)+?|ss)+e", "accssabccbcacbccbbXaccssabccbcacbccbbe" },
{ MU, A, 0, 0, "(a(?:bc|cb|b|c)+|ss)+?e", "accssabccbcacbccbbXaccssabccbcacbccbbe" },
{ MU, A, 0, 0, "(?:(b(c)+?)+)?\?(?:(bc)+|(cb)+)+(?:m)+", "bccbcccbcbccbcbPbccbcccbcbccbcbmmn" },
{ MU, A, 0, 0, "(aa|bb){8,1000}", "abaabbaabbaabbaab_aabbaabbaabbaabbaabbaabb_" },
/* Greedy and non-greedy * operators */
{ CMU, A, 0, 0, "(?:AA)*AB", "aaaaaaamaaaaaaab" },