Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/regex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5dff4bd
Choose a base ref
...
head repository: rust-lang/regex
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5f1f1c8
Choose a head ref
  • 10 commits
  • 13 files changed
  • 2 contributors

Commits on Oct 14, 2023

  1. lite: fix stack overflow in NFA compiler

    This commit fixes a bug where the parser could produce a very deeply
    nested Hir value beyond the configured nested limit. This was caused by
    the fact that the Hir can have some of its nested structures added to it
    without a corresponding recursive call in the parser. For example,
    repetition operators. This means that even if we don't blow the nest
    limit in the parser, the Hir itself can still become nested beyond the
    limit. This in turn will make it possible to unintentionally overflow
    the stack in subsequent recursion over the Hir value, such as in the
    Thompson NFA compiler.
    
    We fix this by checking the nesting limit both on every recursive parse
    call and also on the depth of the final Hir value once parsing is
    finished but before it has returned to the caller.
    
    Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60608
    BurntSushi committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    466e42c View commit details
    Browse the repository at this point in the history
  2. regex-lite-0.1.4

    BurntSushi committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    cd79881 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2023

  1. Configuration menu
    Copy the full SHA
    4ae1472 View commit details
    Browse the repository at this point in the history
  2. lite: fix stack overflow test

    It turns out that we missed another case where the stack could overflow:
    dropping a deeply nested Hir. Namely, since we permit deeply nested Hirs
    to be constructed and only reject them after determining they are too
    deeply nested, they still then need to be dropped. We fix this by
    implementing a custom a Drop impl that uses the heap to traverse the Hir
    and drop things without using unbounded stack space.
    
    An alternative way to fix this would be to adjust the parser somehow to
    avoid building deeply nested Hir values in the first place. But that
    seems trickier, so we just stick with this for now.
    BurntSushi committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    0086dec View commit details
    Browse the repository at this point in the history
  3. regex-lite-0.1.5

    BurntSushi committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    e7bd19d View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. automata/meta: revert broadening of reverse suffix optimization

    This reverts commit 8a8d599 and
    includes a regression test, as well as a tweak to a log message.
    
    Essentially, the broadening was improper. We have to be careful when
    dealing with suffixes as opposed to prefixes. Namely, my logic
    previously was that the broadening was okay because we were already
    doing it for the reverse inner optimization. But the reverse inner
    optimization works with prefixes, not suffixes. So the comparison wasn't
    quite correct.
    
    This goes back to only applying the reverse suffix optimization when
    there is a non-empty single common suffix.
    
    Fixes #1110
    Ref astral-sh/ruff#7980
    BurntSushi committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    eb950f6 View commit details
    Browse the repository at this point in the history
  2. changelog: 1.10.2

    BurntSushi committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    50fe7d1 View commit details
    Browse the repository at this point in the history
  3. regex-automata-0.4.3

    BurntSushi committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    61242b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1a54a82 View commit details
    Browse the repository at this point in the history
  5. 1.10.2

    BurntSushi committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    5f1f1c8 View commit details
    Browse the repository at this point in the history
Loading