-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stack overflow from start set calculation #71842
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions Issue DetailsThis fixes #71808, which was caused by a change I introduced in #71234 making a calculation for the possible starting characters of matches be top-down recursive instead of bottom-up. The bottom-up computation is re-introduced with one improvement: instead of a separate field for the start set, the set field for
|
Still some semantic bug here. |
...tem.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexNode.cs
Outdated
Show resolved
Hide resolved
...tem.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexNode.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Meaning it's still stack overflowing? Or some other test is going to fail? |
Stack overflow is fixed, but something around anchor handling broke. Debugging. |
The bug (both old and new) should be fixed now. All tests pass locally for me now. |
This fixes #71808, which was caused by a change I introduced in #71234 making a calculation for the possible starting characters of matches be top-down recursive instead of bottom-up.
The bottom-up computation is re-introduced with one improvement: instead of a separate field for the start set, the set field for
Singleton
nodes is re-used, since for those the start set coincides with the set. This also allowed making the field non-nullable.