Repository navigation
Fix interpreter callout start_match after \K - #1043
Conversation
|
I can confirm that this fixes #1040 |
|
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 |
|
Removed the redundant assignment and added the no_start_optimize bumpalong case. I also merged current main and resolved the changelog conflict. The native test suite and the new case pass for 8-, 16-, and 32-bit builds with and without JIT on Windows. |
NWilson
left a comment
There was a problem hiding this comment.
Thank you! This looks good, I will merge after CI completes
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.