repo
stringlengths
8
35
pull_number
int64
25
15.2k
instance_id
stringlengths
13
40
issue_numbers
listlengths
1
3
base_commit
stringlengths
40
40
patch
stringlengths
274
342k
test_patch
stringlengths
308
210k
problem_statement
stringlengths
25
44.3k
hints_text
stringlengths
0
33.6k
created_at
stringlengths
19
30
version
stringlengths
3
5
environment_setup_commit
stringlengths
40
40
FAIL_TO_PASS
listlengths
1
1.1k
PASS_TO_PASS
listlengths
0
7.38k
FAIL_TO_FAIL
listlengths
0
1.72k
PASS_TO_FAIL
listlengths
0
49
__index_level_0__
int64
0
689
GuillaumeGomez/sysinfo
509
GuillaumeGomez__sysinfo-509
[ "508" ]
5c69175f028a5608093d31597b93031d165774c5
diff --git a/src/linux/system.rs b/src/linux/system.rs --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -121,7 +121,6 @@ pub struct System { components: Vec<Component>, disks: Vec<Disk>, networks: Networks, - uptime: u64, users: Vec<User>, boot_time: u64, } diff --git a/src/linux/syst...
diff --git a/src/system.rs b/src/system.rs --- a/src/system.rs +++ b/src/system.rs @@ -89,4 +89,15 @@ mod tests { assert!(!hostname.contains('\u{0}')) } } + + #[test] + fn check_uptime() { + let sys = System::new(); + let uptime = sys.get_uptime(); + if System::IS_S...
Uptime: To cache, or not to cache? I've been looking into FreeBSD support this week (#433), and while trying to implement `SystemExt::get_uptime`, I found an inconsistency. Linux uses whatever value was cached during the most recent refresh. https://github.com/GuillaumeGomez/sysinfo/blob/f8574e459d0b1d65ed649cd08...
Linux should be updated to look like the others. Gonna send a PR which will also enforce this behaviour with a test (and thanks for working on freebsd!).
2021-06-11 08:30:22.000000000Z
0.18
3aa83dc410ebe2f6d5063a095104ea6c6394507f
[ "system::tests::check_uptime" ]
[ "linux::network::test::refresh_networks_list_add_interface", "linux::system::test::lsb_release_fallback_not_android", "linux::network::test::refresh_networks_list_remove_interface", "test::ensure_is_supported_is_set_correctly", "system::tests::check_hostname_has_no_nuls", "test::check_host_name", "test:...
[]
[]
670
GuillaumeGomez/sysinfo
887
GuillaumeGomez__sysinfo-887
[ "886" ]
abe8e369d0cee1cf85ddc2d864da875c6312d524
diff --git a/examples/simple.rs b/examples/simple.rs --- a/examples/simple.rs +++ b/examples/simple.rs @@ -342,11 +342,7 @@ fn interpret_input(input: &str, sys: &mut System) -> bool { let minutes = uptime / 60; writeln!( &mut io::stdout(), - "{} days {} hours {}...
diff --git a/tests/code_checkers/docs.rs b/tests/code_checkers/docs.rs --- a/tests/code_checkers/docs.rs +++ b/tests/code_checkers/docs.rs @@ -38,8 +38,7 @@ fn check_md_doc_path(p: &Path, md_line: &str, ty_line: &str) -> bool { show_error( p, &format!( - ...
linux: environ is truncated for long environ ``` $ wc -c /proc/882252/environ 30417 /proc/882252/environ ``` environ for this process is truncated approximately half way through
suspicious size matching truncation: https://github.com/GuillaumeGomez/sysinfo/blob/master/src/linux/process.rs#L623 Nice catch! It should indeed add a size check when reading the file.
2022-12-07 10:58:49.000000000Z
0.26
abe8e369d0cee1cf85ddc2d864da875c6312d524
[ "test_big_environ" ]
[ "common::tests::check_display_impl_process_status", "common::tests::check_uid_gid_from_impls", "linux::network::test::refresh_networks_list_add_interface", "system::tests::check_hostname_has_no_nuls", "linux::network::test::refresh_networks_list_remove_interface", "linux::system::test::lsb_release_fallbac...
[]
[]
672
GuillaumeGomez/sysinfo
835
GuillaumeGomez__sysinfo-835
[ "833" ]
c7046eb4e189afcfb140057caa581d835e1cc51d
diff --git a/src/linux/process.rs b/src/linux/process.rs --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -353,6 +353,7 @@ fn retrieve_all_new_process_info( if refresh_kind.user() { refresh_user_group_ids(&mut p, &mut tmp); + tmp.pop(); } if proc_list.pid.0 != 0 { diff --git a...
diff --git a/src/lib.rs b/src/lib.rs --- a/src/lib.rs +++ b/src/lib.rs @@ -469,4 +469,19 @@ mod test { (new_total - total).abs() ); } + + // We ensure that the `Process` cmd information is retrieved as expected. + #[test] + fn check_cmd_line() { + if !System::IS_SUPPORTED { + ...
Obtaining linux command line requires ProcessRefreshKind::with_user() to be set It seems retrieving process user information must be turned on when loading processes in linux for the command line to be retrieved. ### Expected Refreshing a new System with ProcessRefreshKind::new() loads the process command line data...
This is intriguing. Thanks for opening this issue! I'll try to take a look in the next days but don't hesitate to check before if you want.
2022-09-03 12:49:44.000000000Z
0.26
abe8e369d0cee1cf85ddc2d864da875c6312d524
[ "test::check_cmd_line" ]
[ "common::tests::check_display_impl_process_status", "system::tests::check_hostname_has_no_nuls", "linux::network::test::refresh_networks_list_add_interface", "linux::system::test::lsb_release_fallback_not_android", "linux::network::test::refresh_networks_list_remove_interface", "system::tests::test_refres...
[]
[]
673
crossbeam-rs/crossbeam
1,101
crossbeam-rs__crossbeam-1101
[ "1023" ]
9e8596105bc9a6b343918b6ad1c9656dc24dc4f9
diff --git a/crossbeam-skiplist/src/base.rs b/crossbeam-skiplist/src/base.rs --- a/crossbeam-skiplist/src/base.rs +++ b/crossbeam-skiplist/src/base.rs @@ -871,33 +871,17 @@ where // the lifetime of the guard. let guard = &*(guard as *const _); - let mut search; - loop {...
diff --git a/crossbeam-skiplist/tests/map.rs b/crossbeam-skiplist/tests/map.rs --- a/crossbeam-skiplist/tests/map.rs +++ b/crossbeam-skiplist/tests/map.rs @@ -920,3 +920,24 @@ fn clear() { assert!(s.is_empty()); assert_eq!(s.len(), 0); } + +// https://github.com/crossbeam-rs/crossbeam/issues/1023 +#[test] +f...
crossbeam-skiplist bug [dependencies] crossbeam-skiplist = "0.1.1" ```rs fn main() { let map: Arc<SkipMap<u32, u32>> = Arc::new(SkipMap::new()); map.insert(1, 2); let map1 = map.clone(); std::thread::spawn(move||{ let key = 1; for _ in 0..10_0000 { let len = map1....
Thanks for the report! IIUC, insert reduces the refcount of the old value and then sets the new value, so if insert makes the refcount zero, a get that occurs between the time the refcount is reduced and the new value is set will return None because it sees a deleted value with a refcount of zero. Do you have any pl...
2024-04-12 12:16:27.000000000Z
0.8
9e8596105bc9a6b343918b6ad1c9656dc24dc4f9
[ "concurrent_insert_get_same_key" ]
[ "clear", "compare_insert_with_absent_key", "compare_and_insert", "entry_remove", "entry_reposition", "front_and_back", "entry", "get", "get_next_prev", "get_or_insert_with", "get_or_insert_with_panic", "get_or_insert", "insert", "into_iter", "is_empty", "insert_and_remove", "iter", ...
[]
[]
674
crossbeam-rs/crossbeam
552
crossbeam-rs__crossbeam-552
[ "551" ]
bfb7705989a0961a16386ae2109bc2ef7f0bbe5e
diff --git a/crossbeam-epoch/src/internal.rs b/crossbeam-epoch/src/internal.rs --- a/crossbeam-epoch/src/internal.rs +++ b/crossbeam-epoch/src/internal.rs @@ -55,7 +55,7 @@ use crate::sync::queue::Queue; /// Maximum number of objects a bag can contain. #[cfg(not(feature = "sanitize"))] -const MAX_OBJECTS: usize = 6...
diff --git a/crossbeam-epoch/src/internal.rs b/crossbeam-epoch/src/internal.rs --- a/crossbeam-epoch/src/internal.rs +++ b/crossbeam-epoch/src/internal.rs @@ -374,6 +372,13 @@ pub struct Local { pin_count: Cell<Wrapping<usize>>, } +// Make sure `Local` is less than or equal to 2048 bytes. +// https://github.com...
The Local structure is 2104 bytes long and jemalloc rounds this to 4096 bytes. The Local structure here https://searchfox.org/mozilla-central/source/third_party/rust/crossbeam-epoch/src/internal.rs#287 is 2104 bytes long. When compiled into Firefox and using the jamalloc memory allocator this is rounded up to 4096 byte...
`Local::bag` field is 2056 bytes and already exceeds 2048 bytes, so there seems to be no other way to do this than reduce the size of `Bag`. https://github.com/crossbeam-rs/crossbeam/blob/bfb7705989a0961a16386ae2109bc2ef7f0bbe5e/crossbeam-epoch/src/internal.rs#L362-L363 And to reduce the size of the `Bag`, it ne...
2020-09-01 08:37:42.000000000Z
0.7
bfb7705989a0961a16386ae2109bc2ef7f0bbe5e
[ "internal::local_size" ]
[ "atomic::tests::valid_tag_i64", "atomic::tests::valid_tag_i8", "collector::tests::drop_array", "collector::tests::flush_local_bag", "collector::tests::garbage_buffering", "collector::tests::pin_reentrant", "deferred::tests::long_slice_usize", "deferred::tests::boxed_slice_i32", "deferred::tests::on_...
[ "crossbeam-epoch/src/guard.rs - guard::unprotected (line 449)" ]
[]
676
dtolnay/syn
1,759
dtolnay__syn-1759
[ "1710" ]
e011ba794aba6aaa0d5c96368bf6cf686581ee96
diff --git a/src/attr.rs b/src/attr.rs index 579452bbf..2bdf96ee7 100644 --- a/src/attr.rs +++ b/src/attr.rs @@ -653,6 +653,7 @@ pub(crate) mod parsing { use crate::parse::{Parse, ParseStream}; use crate::path::Path; use crate::{mac, token}; + use proc_macro2::Ident; use std::fmt::{self, Display}...
diff --git a/tests/repo/mod.rs b/tests/repo/mod.rs index 6c367c944..9f8a418ab 100644 --- a/tests/repo/mod.rs +++ b/tests/repo/mod.rs @@ -25,13 +25,6 @@ static EXCLUDE_FILES: &[&str] = &[ "tests/rustdoc/unsafe-extern-blocks.rs", "tests/ui/rust-2024/unsafe-extern-blocks/safe-items.rs", - // TODO: unsafe at...
Parse unsafe attributes - https://github.com/rust-lang/rust/issues/123757 - https://github.com/rust-lang/rfcs/pull/3325 ```console error: expected identifier, found keyword `unsafe` --> dev/main.rs:4:3 | 4 | #[unsafe(no_mangle)] | ^^^^^^ ```
2024-10-20 06:16:50.000000000Z
2.0
e011ba794aba6aaa0d5c96368bf6cf686581ee96
[ "test_unparenthesize" ]
[ "drops::test_needs_drop", "regression::issue1108::issue1108", "regression::issue1235::main", "test_async_closure", "test_async_fn", "test_bool_lit", "test_meta_item_list_bool_value", "test_meta_item_list_lit", "test_meta_item_bool_value", "test_meta_item_list_name_value", "test_meta_item_list_wo...
[]
[]
677
rust-lang/regex
1,111
rust-lang__regex-1111
[ "1110" ]
e7bd19dd3ebf4b1a861275f0353202bf93a39ab1
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(); - ...
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...
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...
2023-10-16 14:23:23.000000000Z
1.10
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:...
[]
[]
679
rust-lang/regex
1,072
rust-lang__regex-1072
[ "1070" ]
7536e055840f74f1f7bda8ffecf851cb3e500147
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...
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 ...
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...
2023-08-26 12:53:23.000000000Z
1.9
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...
[]
[]
680
rust-lang/regex
1,063
rust-lang__regex-1063
[ "1060" ]
bbf0b38df618734b92d7b92acc8a8bf31b6d0046
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())); } } +...
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-...
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...
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...
2023-08-05 21:38:26.000000000Z
1.9
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...
[]
[]
681
rust-lang/regex
1,000
rust-lang__regex-1000
[ "999" ]
d555d6122d1d1a354c45361d029571413beca8ef
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. - ...
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![ + ...
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",...
This was originally reported via ripgrep: https://github.com/rust-lang/regex/issues/999
2023-05-25 15:45:45.000000000Z
1.8
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...
[]
[]
682
rust-lang/regex
984
rust-lang__regex-984
[ "981" ]
93316a3b1adc43cc12fab6c73a59f646658cd984
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...
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...
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...
2023-04-21 11:29:01.000000000Z
1.8
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...
[]
[]
683
rust-lang/regex
970
rust-lang__regex-970
[ "969" ]
32fed9429eafba0ae92a64b01796a0c5a75b88c8
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...
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/...
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...
2023-03-24 23:57:50.000000000Z
1.7
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_...
[]
[]
684
rust-lang/regex
879
rust-lang__regex-879
[ "878", "877" ]
c01b6338046f495ad875ecf3dfa5e9b39eada4ea
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...
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...
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 ...
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 ...
2022-07-05 16:35:20.000000000Z
1.5
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_...
[]
[]
685
rust-lang/regex
863
rust-lang__regex-863
[ "862" ]
88a2a62d861d189faae539990f63cb9cf195bd8c
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 ...
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...
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:...
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(...
2022-05-20 17:32:56.000000000Z
1.5
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...
[]
[]
686
rust-lang/regex
752
rust-lang__regex-752
[ "751" ]
951b8b93bbb669e8aa192031a7b66beaa4ea5780
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 ...
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...
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....
This is a dupe of #750.
2021-03-14 18:23:50.000000000Z
1.4
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 (...
[]
[]
687
rust-lang/regex
641
rust-lang__regex-641
[ "640" ]
2a8ddd0b36095d3810f3556627cd59c5014edd01
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...
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"), + ...
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...
2020-01-30 22:43:04.000000000Z
1.3
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...
[]
[]
688
rust-lang/regex
637
rust-lang__regex-637
[ "628", "521" ]
e36670a90585b940b0d4f780a053c6db1be7b863
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...
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 { ...
(#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...
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
2020-01-09 18:35:20.000000000Z
1.3
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...
[]
[]
689