Skip to content

Match_Timeout_Loop_Throws test is not timing out with RegexOptions.NonBacktracking #60623

Closed

Description

@stephentoub

Description

The test validates that a timeout exception is thrown, but it's not happening with RegexOptions.NonBacktracking.

Reproduction Steps

Remove the ActiveIssue from the test.

Expected behavior

Exception thrown.

Actual behavior

No exception thrown.

Regression?

No

Known Workarounds

No response

Configuration

No response

Other information

No response

Activity

  1. added this to the 7.0.0 milestone on Oct 19, 2021
  2. ghost added
    untriaged
    on Oct 19, 2021
  3. removed
    untriaged
    on Oct 19, 2021
  4. stephentoub commented on Oct 19, 2021

    @stephentoub
    MemberAuthor
  5. self-assigned this
    on Mar 11, 2022
  6. added
    disabled-test
    on Mar 14, 2022
  7. removed their assignment
    on Mar 14, 2022
  8. stephentoub commented on Mar 14, 2022

    @stephentoub
    MemberAuthor

    @olsaarik, I think the issue here is that we're only checking for timeout during phase 1, but with the pattern @"a\s+", phase 1 will be really fast (only looks at two characters). Phase 2 is then really fast as well, but Phase 3 takes a very long time (iterating through 800 million characters) without timeout checks.

    I believe you're working on overhauling phase 1 to find the longest match. Will that fix this as well then?

  9. stephentoub commented on Apr 20, 2022

    @stephentoub
    MemberAuthor

    This test no longer exists.

  10. ghost locked as resolved and limited conversation to collaborators on May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Text.RegularExpressionsdisabled-test

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions