Repository navigation
Fix interpreter callout start_match after \K - #1043
Open
CAOShurong wants to merge 1 commit into
Open
CAOShurong wants to merge 1 commit into
CAOShurong wants to merge 1 commit into
Conversation
|
I can confirm that this fixes #1040 |
Member
|
Great, I have a few review comments.
/* OK, we can now run the match. If "hitend" is set afterwards, remember the
first starting point for which a partial match was found. */
cb.start_match = (PCRE2_SIZE)(start_match - subject);
cb.callout_flags |= PCRE2_CALLOUT_STARTMATCH;The callout_flags do need to be updated, but the write to start_match now has no effect. No thanks to GPT - I found that one myself.
Everything else looks good, to me. I can see that the documentation already agrees with this change. I can see that the DFA engine already has the correct behaviour (it doesn't have |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1040.
Set the interpreter callout's
start_matchfrom the current match frame, so\Kand backtracking report the same start offset as JIT.Add regressions for numeric, string, automatic and conditional callouts, repeated resets, subroutines and retries. Full CTest passes on Windows/MSVC with 8-, 16- and 32-bit libraries and JIT; an installed CMake consumer also passes the API checks.