repo
stringclasses
1 value
created_at
stringlengths
20
20
instance_id
stringlengths
20
21
test_patch
stringlengths
560
7.45k
hints_text
stringclasses
7 values
patch
stringlengths
911
342k
issue_numbers
listlengths
1
2
pull_number
int64
637
1.11k
problem_statement
stringlengths
702
2.89k
version
stringclasses
7 values
base_commit
stringlengths
40
40
environment_setup_commit
stringclasses
7 values
FAIL_TO_PASS
listlengths
1
6
PASS_TO_PASS
listlengths
63
1.98k
FAIL_TO_FAIL
listlengths
0
0
PASS_TO_FAIL
listlengths
0
0
rust-lang/regex
2023-10-16T14:23:23Z
rust-lang__regex-1111
diff --git a/testdata/regression.toml b/testdata/regression.toml --- a/testdata/regression.toml +++ b/testdata/regression.toml @@ -813,3 +813,18 @@ name = "hir-optimization-out-of-order-class" regex = '^[[:alnum:]./-]+$' haystack = "a-b" matches = [[0, 3]] + +# This is a regression test for an improper reverse suffi...
diff --git a/regex-automata/src/meta/strategy.rs b/regex-automata/src/meta/strategy.rs --- a/regex-automata/src/meta/strategy.rs +++ b/regex-automata/src/meta/strategy.rs @@ -1167,21 +1167,34 @@ impl ReverseSuffix { return Err(core); } let kind = core.info.config().get_match_kind(); - ...
[ "1110" ]
1,111
broadening of reverse suffix optimization has led to incorrect matches Specifically, this program succeeds in `regex 1.9.x` but fails in `regex 1.10.1`: ```rust fn main() -> anyhow::Result<()> { let re = regex::Regex::new(r"(\\N\{[^}]+})|([{}])").unwrap(); let hay = r#"hiya \N{snowman} bye"#; let mat...
1.10
e7bd19dd3ebf4b1a861275f0353202bf93a39ab1
10fe722a3fcfdc17068b21f3262189cc52227bb5
[ "suite_string::default" ]
[ "misc::capture_index_panic_name - should panic", "fuzz::meta_stopat_specialize_start_states_min", "fuzz::slow_big_empty_chain4", "fuzz::slow_big_empty_chain6", "regression::regression_invalid_repetition_expr", "misc::capture_index_panic_usize - should panic", "fuzz::fail_branch_prevents_match", "misc:...
[]
[]
rust-lang/regex
2023-08-26T12:53:23Z
rust-lang__regex-1072
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,10 +54,14 @@ jobs: os: ubuntu-latest rust: stable target: i686-unknown-linux-gnu - - build: stable-mips + - build: stable-powerpc64 ...
diff --git a/regex-automata/src/util/prefilter/aho_corasick.rs b/regex-automata/src/util/prefilter/aho_corasick.rs --- a/regex-automata/src/util/prefilter/aho_corasick.rs +++ b/regex-automata/src/util/prefilter/aho_corasick.rs @@ -22,11 +22,20 @@ impl AhoCorasick { } #[cfg(feature = "perf-literal-mult...
[ "1070" ]
1,072
RegexSet and Regex give different results for the same pattern in 1.9 #### What version of regex are you using? `1.9.3`. The issue is present in regex `1.9.0` and later. #### Describe the bug at a high level. `RegexSet::new([r"(?m)^ *v [0-9]"]).unwrap().is_match("v 0")` incorrectly returns false in version 1.9...
1.9
7536e055840f74f1f7bda8ffecf851cb3e500147
17284451f10aa06c6c42e622e3529b98513901a8
[ "suite_string_set::default" ]
[ "fuzz::fail_branch_prevents_match", "fuzz::meta_stopat_specialize_start_states", "fuzz::slow_big_empty_chain", "fuzz::slow_big_empty_chain4", "misc::capture_index_lifetime", "fuzz::slow_big_empty_chain3", "fuzz::slow_big_empty_chain2", "fuzz::slow_big_empty_chain5", "fuzz::meta_stopat_specialize_sta...
[]
[]
rust-lang/regex
2023-08-05T21:38:26Z
rust-lang__regex-1063
diff --git a/testdata/regression.toml b/testdata/regression.toml --- a/testdata/regression.toml +++ b/testdata/regression.toml @@ -739,3 +739,20 @@ matches = [[0, 9]] utf8 = false match-kind = "all" search-kind = "overlapping" + +# See: https://github.com/rust-lang/regex/issues/1060 +[[test]] +name = "reverse-inner-...
CLI reproduction: ``` $ regex-cli find match meta -p '(?:(\d+)[:.])?(\d{1,2})[:.](\d{2})' -y '888:77:66' parse time: 27.056µs translate time: 9.404µs build meta time: 263.862µs search time: 28.082µs total matches: 1 0:1:9:88:77:66 ``` The match should be `0:9` but `1:9` is reported. Th...
diff --git a/regex-automata/src/meta/limited.rs b/regex-automata/src/meta/limited.rs --- a/regex-automata/src/meta/limited.rs +++ b/regex-automata/src/meta/limited.rs @@ -88,7 +88,41 @@ pub(crate) fn dfa_try_search_half_rev( return Err(RetryError::Quadratic(RetryQuadraticError::new())); } } +...
[ "1060" ]
1,063
reverse inner literal optimization results in incorrect match offsets in some cases #### What version of regex are you using? The bug is present in version 1.9.0 and 1.9.1. 1.8.4 was the last working version. #### Describe the bug at a high level. I am using the regex crate for parsing textual video durations...
1.9
bbf0b38df618734b92d7b92acc8a8bf31b6d0046
17284451f10aa06c6c42e622e3529b98513901a8
[ "suite_string::default" ]
[ "fuzz::fail_branch_prevents_match", "fuzz::slow_big_empty_chain", "fuzz::slow_big_empty_chain3", "fuzz::meta_stopat_specialize_start_states", "fuzz::slow_big_empty_chain4", "misc::capture_index_lifetime", "misc::capture_index", "fuzz::slow_big_empty_chain6", "fuzz::slow_big_empty_chain2", "fuzz::m...
[]
[]
rust-lang/regex
2023-05-25T15:45:45Z
rust-lang__regex-1000
diff --git a/tests/regression.rs b/tests/regression.rs --- a/tests/regression.rs +++ b/tests/regression.rs @@ -248,3 +248,16 @@ fn regression_big_regex_overflow() { let re = regex_new!(pat); assert!(re.is_err()); } + +#[test] +fn regression_complete_literals_suffix_incorrect() { + let needles = vec![ + ...
This was originally reported via ripgrep: https://github.com/rust-lang/regex/issues/999
diff --git a/src/exec.rs b/src/exec.rs --- a/src/exec.rs +++ b/src/exec.rs @@ -1439,7 +1439,18 @@ impl ExecReadOnly { // This case shouldn't happen. When the regex isn't // anchored, then complete prefixes should imply complete // suffixes. - ...
[ "999" ]
1,000
regex with many literal alternates can erroneously match the empty string This program panics: ```rust fn main() { let needles = vec![ "aA", "bA", "cA", "dA", "eA", "fA", "gA", "hA", "iA", "jA", "kA", "lA", "mA", "nA", "oA", "pA", "qA", "rA", "sA", "tA", "uA", "vA", "wA", "xA", "yA",...
1.8
d555d6122d1d1a354c45361d029571413beca8ef
d555d6122d1d1a354c45361d029571413beca8ef
[ "regression::regression_complete_literals_suffix_incorrect" ]
[ "compile::tests::byte_classes", "compile::tests::full_byte_classes", "dfa::tests::prop_read_write_i32", "dfa::tests::prop_read_write_u32", "expand::tests::find_cap_ref1", "exec::test::uppercut_s_backtracking_bytes_default_bytes_mismatch", "exec::test::unicode_lit_star_backtracking_utf8bytes_default_utf8...
[]
[]
rust-lang/regex
2023-04-21T11:29:01Z
rust-lang__regex-984
diff --git a/regex-syntax/src/hir/translate.rs b/regex-syntax/src/hir/translate.rs --- a/regex-syntax/src/hir/translate.rs +++ b/regex-syntax/src/hir/translate.rs @@ -3287,6 +3287,12 @@ mod tests { assert_eq!(p.minimum_len(), Some(1)); } + #[test] + fn analysis_look_set_prefix_any() { + let...
diff --git a/regex-syntax/src/hir/mod.rs b/regex-syntax/src/hir/mod.rs --- a/regex-syntax/src/hir/mod.rs +++ b/regex-syntax/src/hir/mod.rs @@ -1854,6 +1854,8 @@ struct PropertiesI { look_set: LookSet, look_set_prefix: LookSet, look_set_suffix: LookSet, + look_set_prefix_any: LookSet, + look_set_suf...
[ "981" ]
984
Regex matching changed in 1.8.0 #### What version of regex are you using? This appears to be a bug in 1.8.0. #### Describe the bug at a high level. Something in the regex matching changed in 1.8.0. I suspect it might be a bug in the handling of word boundaries, `\b`. #### What are the steps to reproduce the...
1.8
93316a3b1adc43cc12fab6c73a59f646658cd984
d555d6122d1d1a354c45361d029571413beca8ef
[ "regression::regression_bad_word_boundary" ]
[ "compile::tests::byte_classes", "compile::tests::full_byte_classes", "dfa::tests::prop_read_write_u32", "dfa::tests::prop_read_write_i32", "expand::tests::find_cap_ref1", "expand::tests::find_cap_ref10", "expand::tests::find_cap_ref11", "exec::test::uppercut_s_backtracking_bytes_default_bytes_mismatch...
[]
[]
rust-lang/regex
2023-03-24T23:57:50Z
rust-lang__regex-970
diff --git a/tests/test_default.rs b/tests/test_default.rs --- a/tests/test_default.rs +++ b/tests/test_default.rs @@ -220,3 +220,13 @@ fn empty_alt_regex_fails() { let result = Regex::new(r"(?:|){4294967295}"); assert!(result.is_err()); } + +// Regression test for: https://github.com/rust-lang/regex/issues/...
diff --git a/src/exec.rs b/src/exec.rs --- a/src/exec.rs +++ b/src/exec.rs @@ -459,7 +459,7 @@ impl<'c> RegularExpression for ExecNoSync<'c> { self.cache.value(), true, &text[start..], - text.len(), + text.len() - start...
[ "969" ]
970
Index out of bounds panic when using `shortest_match_at`, `is_match_at` with end-anchored regex #### What version of regex are you using? 1.7.2, 1.7.1 #### Describe the bug at a high level. `Regex::shortest_match_at` panics for certain regex patterns when given seemingly valid inputs. From the stack trace it l...
1.7
32fed9429eafba0ae92a64b01796a0c5a75b88c8
fd1d95b1bd15db8a31efa82585a1842ad34091f1
[ "regression_i969" ]
[ "compile::tests::byte_classes", "compile::tests::full_byte_classes", "dfa::tests::prop_read_write_i32", "dfa::tests::prop_read_write_u32", "expand::tests::find_cap_ref1", "expand::tests::find_cap_ref10", "expand::tests::find_cap_ref11", "expand::tests::find_cap_ref12", "exec::test::unicode_lit_star_...
[]
[]
rust-lang/regex
2022-07-05T16:35:20Z
rust-lang__regex-879
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,47 +30,45 @@ jobs: - win-gnu include: - build: pinned - os: ubuntu-18.04 + os: ubuntu-latest rust: 1.41.1 - build: stable...
If this was really added in Unicode 14, then this makes sense since I don't believe the regex crate has had its Unicode tables updated to 14 yet. They're still on 13. No real reason for it. Just hasn't been done yet. Also, FWIW, the regex crate does not expose any direct way to access Unicode blocks. But if Unicode's ...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,18 +161,14 @@ jobs: runs-on: ubuntu-18.04 steps: - name: Checkout repository - uses: actions/checkout@v1 - with: - fetch-depth: 1 + uses: actions/ch...
[ "878", "877" ]
879
Update Unicode tables to version 14.0 This PR is related to #877. While working on the next release of my command-line tool [grex](https://github.com/pemistahl/grex), some of my property tests fail now because the regexes produced from characters introduced in Unicode 14.0 do not match those characters when tested ...
1.5
c01b6338046f495ad875ecf3dfa5e9b39eada4ea
5e98788947b28da3da27f4e156b877eb0cb1593e
[ "unicode::uni_vithkuqi_literal_lower", "unicode::uni_vithkuqi_word_lower", "unicode::uni_vithkuqi_word_upper" ]
[ "compile::tests::byte_classes", "compile::tests::full_byte_classes", "dfa::tests::prop_read_write_i32", "dfa::tests::prop_read_write_u32", "expand::tests::find_cap_ref1", "expand::tests::find_cap_ref10", "exec::test::uppercut_s_backtracking_bytes_default_bytes_mismatch", "exec::test::unicode_lit_star_...
[]
[]
rust-lang/regex
2022-05-20T17:32:56Z
rust-lang__regex-863
diff --git a/regex-syntax/src/hir/literal/mod.rs b/regex-syntax/src/hir/literal/mod.rs --- a/regex-syntax/src/hir/literal/mod.rs +++ b/regex-syntax/src/hir/literal/mod.rs @@ -1141,6 +1141,11 @@ mod tests { test_lit!(pfx_group1, prefixes, "(a)", M("a")); test_lit!(pfx_rep_zero_or_one1, prefixes, "a?"); te...
Wow. Yes, this is a bug. I am amazed that this isn't captured by the test suite. Non-greediness itself works (both `ab*?` and `ab+?` work as expected), but it looks like `ab??` doesn't specifically: ```rust fn main() { let rx = regex::Regex::new("ab??").unwrap(); let input = "abb"; let mat = rx.find(...
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The below are changes for the next release, which is to be determined. Fixes a bug where `[[:alnum:][:^ascii:]]` dropped `[:alnum:]` from the class. * [BUG #859](https://github.com/rust-lang/regex/issues/859): Fixes a ...
[ "862" ]
863
Unexpected behavior of ungreedy ?? operator #### What version of regex are you using? 1.5.5 #### Describe the bug at a high level. Running the regex `ab??` on the input `ab` returns the match `ab` instead of `a`. #### What are the steps to reproduce the behavior? ```rust fn main() { let rx = regex:...
1.5
88a2a62d861d189faae539990f63cb9cf195bd8c
5e98788947b28da3da27f4e156b877eb0cb1593e
[ "regression::non_greedy_question_literal" ]
[ "compile::tests::byte_classes", "compile::tests::full_byte_classes", "dfa::tests::prop_read_write_u32", "dfa::tests::prop_read_write_i32", "expand::tests::find_cap_ref1", "exec::test::uppercut_s_backtracking_bytes_default_bytes_mismatch", "exec::test::unicode_lit_star_backtracking_utf8bytes_default_utf8...
[]
[]
rust-lang/regex
2021-03-14T18:23:50Z
rust-lang__regex-752
diff --git a/tests/test_default.rs b/tests/test_default.rs --- a/tests/test_default.rs +++ b/tests/test_default.rs @@ -136,3 +136,18 @@ fn oibits_regression() { let _ = panic::catch_unwind(|| Regex::new("a").unwrap()); } + +// See: https://github.com/rust-lang/regex/issues/750 +#[test] +#[cfg(target_pointer_wid...
This is a dupe of #750.
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +1.4.5 (2021-03-14) +================== +This is a small patch release that fixes a regression in the size of a `Regex` +in the 1.4.4 release. Prior to 1.4.4, a `Regex` was 552 bytes. In the 1.4.4 +release, it was 856 bytes ...
[ "751" ]
752
1.44 triggers a stack overflow on Windows #### What version of regex are you using? 1.44 #### Describe the bug at a high level. Running bindgen as part of the [mozjs](https://github.com/servo/mozjs) build script triggers a stack overflow on Windows. #### What are the steps to reproduce the behavior? N.B....
1.4
951b8b93bbb669e8aa192031a7b66beaa4ea5780
951b8b93bbb669e8aa192031a7b66beaa4ea5780
[ "regex_is_reasonably_small" ]
[ "src/lib.rs - (line 26)", "src/lib.rs - (line 69)", "src/re_bytes.rs - re_bytes::Replacer::by_ref (line 1140)", "src/re_bytes.rs - re_bytes::Captures<'t>::get (line 928)", "src/lib.rs - (line 426)", "src/lib.rs - (line 245)", "src/lib.rs - (line 137)", "src/lib.rs - (line 36)", "src/lib.rs - bytes (...
[]
[]
rust-lang/regex
2020-01-30T22:43:04Z
rust-lang__regex-641
diff --git a/regex-syntax/src/hir/translate.rs b/regex-syntax/src/hir/translate.rs --- a/regex-syntax/src/hir/translate.rs +++ b/regex-syntax/src/hir/translate.rs @@ -1641,6 +1644,20 @@ mod tests { hir_lit("β"), ]) ); + assert_eq!( + t("(?:(?i-u)a)b"), + ...
diff --git a/regex-syntax/src/hir/translate.rs b/regex-syntax/src/hir/translate.rs --- a/regex-syntax/src/hir/translate.rs +++ b/regex-syntax/src/hir/translate.rs @@ -159,18 +159,19 @@ enum HirFrame { /// indicated by parentheses (including non-capturing groups). It is popped /// upon leaving a group. Gr...
[ "640" ]
641
Flag effect remains active outside of current group The [`regex` documentation](https://docs.rs/regex/1.3.1/regex/#grouping-and-flags) suggests that flags (`(?foo)`) only apply within the 'current group', which would match the behaviour of Perl and PCRE, but that doesn't seem to be the case: ``` # With PCRE % prin...
1.3
2a8ddd0b36095d3810f3556627cd59c5014edd01
96456ddcc91d8d2e98d4b6f32ebd052d879d6a67
[ "regression::flags_are_unset" ]
[ "src/lib.rs - (line 26)", "src/lib.rs - (line 69)", "src/re_bytes.rs - re_bytes::Replacer::by_ref (line 1105)", "src/lib.rs - (line 244)", "src/lib.rs - (line 36)", "src/lib.rs - (line 425)", "src/lib.rs - (line 406)", "src/lib.rs - (line 120)", "src/lib.rs - (line 217)", "src/lib.rs - bytes (line...
[]
[]
rust-lang/regex
2020-01-09T18:35:20Z
rust-lang__regex-637
diff --git a/regex-syntax/src/ast/parse.rs b/regex-syntax/src/ast/parse.rs --- a/regex-syntax/src/ast/parse.rs +++ b/regex-syntax/src/ast/parse.rs @@ -5713,6 +5719,20 @@ bar ], })) ); + assert_eq!( + parser(r"\p\{").parse().unwrap_err(), + TestError { ...
The CI failure is only for Rust “stable.” It appears to be unrelated to the changes in this PR. https://travis-ci.com/rust-lang/regex/jobs/257680677 CI failure issue https://github.com/rust-lang/regex/issues/634
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +1.3.2 (2020-01-09) +================== +This is a small maintenance release with some house cleaning and bug fixes. + +New features: + +* [FEATURE #631](https://github.com/rust-lang/regex/issues/631): + Add a `Match::range...
[ "628", "521" ]
637
(#521, #627) Fixes for split() and splitn() * #627: Corrects `/-/.split("a-")` to return `["a", ""]` correctly instead of `["a"]`. * #521: Corrects `/-/.splitn("a", 2)` to return `["a"]` correctly instead of `["a", ""]`. * Adds a bunch of tests. * Adds entries in CHANGELOG.md. Note that a couple of existing tests...
1.3
e36670a90585b940b0d4f780a053c6db1be7b863
96456ddcc91d8d2e98d4b6f32ebd052d879d6a67
[ "api::split2", "api::split3", "api::split_empty", "api::split_trailing_blank", "api::split_trailing_blanks", "api::splitn_below_limit" ]
[ "src/lib.rs - (line 26)", "src/lib.rs - (line 69)", "src/lib.rs - (line 244)", "src/lib.rs - (line 425)", "src/lib.rs - (line 36)", "src/lib.rs - (line 391)", "src/lib.rs - (line 137)", "src/lib.rs - (line 120)", "src/lib.rs - (line 406)", "src/lib.rs - (line 217)", "src/re_set.rs - re_set::byte...
[]
[]