Uh oh!
There was an error while loading. Please reload this page.
Fix length check for Regex BOL FindFirstChar optimization - #55574
Conversation
For a beginning-of-line anchor, in FindFirstChar we use IndexOf to quickly skip ahead to the next \n. But we neglected to check to see whether that brought us past an explicitly specified end position. This just adds the missing check.
ghost
commented
Jul 13, 2021
Tagging subscribers to this area: @eerhardt, @dotnet/area-system-text-regularexpressions Issue DetailsFor a beginning-of-line anchor, in FindFirstChar we use IndexOf to quickly skip ahead to the next \n. But we neglected to check to see whether that brought us past an explicitly specified end position. This just adds the missing check. Fixes #55557
|
eerhardt
left a comment
There was a problem hiding this comment.
LGTM
Do you think this warrants a backport to 5.0?
stephentoub
commented
Jul 13, 2021
It's a simple fix, so I'm not against backporting it. But it also requires a pretty special combination of things (a |
For a beginning-of-line anchor, in FindFirstChar we use IndexOf to quickly skip ahead to the next \n. But we neglected to check to see whether that brought us past an explicitly specified end position. This just adds the missing check.
Fixes#55557
cc: @strobelleder, @dotnet/area-system-text-regularexpressions