Skip to content

Commit

Permalink
Update regex and globset to pull in memory usage fixes
Browse files Browse the repository at this point in the history
Summary:
BurntSushi has fixed a memory usage regression introduced by regex 1.9 which caused Buck to allocate and retain significantly more memory when using moderately sized `buck2_common::ignores::ignore_set::IgnoreSet` objects concurrently from many threads.

- Bug report: **[rust-lang/regex#1059](rust-lang/regex#1059) *"1.9 memory usage: globset-generated RegexSet allocates and retains 48× more memory (600MB) vs regex 1.8"***

- Globset fix: **[BurntSushi/ripgrep#25770](https://github.com/BurntSushi/ripgrep/pull/25770) *"globset: use non-capture groups in regex transform"***

- Regex fix: **[rust-lang/regex#1062](rust-lang/regex#1062) *"fix memory usage regression for RegexSet with capture groups"***

Reviewed By: zertosh

Differential Revision: D48095372

fbshipit-source-id: ec11c2bcaccbd26354d6d0a0398000134eaf3681
  • Loading branch information
David Tolnay authored and facebook-github-bot committed Aug 5, 2023
1 parent 6a289bf commit 7f22152
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion detcore/Cargo.toml
Expand Up @@ -44,7 +44,7 @@ rand = { version = "0.8", features = ["small_rng"] }
rand_distr = "0.4"
rand_pcg = { version = "0.3", features = ["serde1"] }
raw-cpuid = "10.6.0"
regex = "1.6.0"
regex = "1.9.2"
reverie = { version = "0.1.0", git = "https://github.com/facebookexperimental/reverie.git", branch = "main" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
Expand Down
2 changes: 1 addition & 1 deletion hermit-cli/Cargo.toml
Expand Up @@ -24,7 +24,7 @@ once_cell = "1.12"
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false }
rand = { version = "0.8", features = ["small_rng"] }
rand_pcg = { version = "0.3", features = ["serde1"] }
regex = "1.6.0"
regex = "1.9.2"
reverie = { version = "0.1.0", git = "https://github.com/facebookexperimental/reverie.git", branch = "main" }
reverie-ptrace = { version = "0.1.0", git = "https://github.com/facebookexperimental/reverie.git", branch = "main" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Expand Up @@ -162,5 +162,5 @@ path = "standalone/stacktrace_events.rs"
detcore = { version = "0.0.0", path = "../detcore" }
libc = "0.2.139"
nix = "0.25"
regex = "1.6.0"
regex = "1.9.2"
tempfile = "3.5"

0 comments on commit 7f22152

Please sign in to comment.