Repository navigation
Fix handling of atomic nodes in RegexCompiler / source generator - #66046
Merged
Merged
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions Issue DetailsWe weren't properly resetting the stack position, so if we had an atomic group that contained something that backtracked, any backtracking positions left on the stack by that nested construct would then be consumed by a previous backtracking construct and lead to it reading the wrong state.
|
joperezr
reviewed
Mar 2, 2022
joperezr
approved these changes
Mar 2, 2022
stephentoub
force-pushed
the
fixatomiccodegen
branch
from
March 2, 2022 21:26
92d029d to
a1e1878
Compare
Member
Author
|
Thanks, @joperezr. I realized we have a similar issue for positive/negative lookaheads, which are implicitly atomic, so I pushed a small commit to address those, too. |
stephentoub
force-pushed
the
fixatomiccodegen
branch
2 times, most recently
from
March 3, 2022 04:11
e7a3117 to
091d2f0
Compare
We weren't properly resetting the stack position, so if we had an atomic group that contained something that backtracked, any backtracking positions left on the stack by that nested construct would then be consumed by a previous backtracking construct and lead to it reading the wrong state.
stephentoub
force-pushed
the
fixatomiccodegen
branch
from
March 3, 2022 14:37
091d2f0 to
19f9a34
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We weren't properly resetting the stack position, so if we had an atomic group that contained something that backtracked, any backtracking positions left on the stack by that nested construct would then be consumed by a previous backtracking construct and lead to it reading the wrong state.