From 924b72f2fbcc2118d6962b8405bd0a7e7845da75 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 5 Aug 2023 14:20:27 -0700 Subject: [PATCH] Update regex and globset to pull in memory usage fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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](https://github.com/rust-lang/regex/issues/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](https://github.com/rust-lang/regex/pull/1062) *"fix memory usage regression for RegexSet with capture groups"*** Reviewed By: zertosh Differential Revision: D48095372 fbshipit-source-id: ec11c2bcaccbd26354d6d0a0398000134eaf3681 --- Cargo.toml | 2 +- vendor/ocaml/interop/shim/third-party/rust/Cargo.toml | 2 +- vendor/ocaml/interop/signed_source/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e54f4b97..6f5c29f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ num_enum = "0.5" ocamlrep = { path = "vendor/ocaml/interop/ocamlrep" } ocamlrep_ocamlpool = { path = "vendor/ocaml/interop/ocamlrep_ocamlpool" } phf = { version = "0.11", features = ["macros"] } -regex = "1.6.0" +regex = "1.9.2" rust_to_ocaml_attr = { path = "vendor/ocaml/interop/rust_to_ocaml/rust_to_ocaml_attr" } serde = { version = "1.0.176", features = ["derive", "rc"] } thiserror = "1.0.43" diff --git a/vendor/ocaml/interop/shim/third-party/rust/Cargo.toml b/vendor/ocaml/interop/shim/third-party/rust/Cargo.toml index dd242aa5..bc7c5e73 100644 --- a/vendor/ocaml/interop/shim/third-party/rust/Cargo.toml +++ b/vendor/ocaml/interop/shim/third-party/rust/Cargo.toml @@ -22,7 +22,7 @@ md-5 = "0.10" once_cell = "1.12" proc-macro2 = { version = "1.0.64", features = ["span-locations"] } quote = "1.0.29" -regex = "1.6.0" +regex = "1.9.2" rustc-hash = "1.1.0" serde = { version = "1.0.176", features = ["derive", "rc"] } similar = { version = "2.2.0", features = ["inline"] } diff --git a/vendor/ocaml/interop/signed_source/Cargo.toml b/vendor/ocaml/interop/signed_source/Cargo.toml index fcb16b32..a814ca60 100644 --- a/vendor/ocaml/interop/signed_source/Cargo.toml +++ b/vendor/ocaml/interop/signed_source/Cargo.toml @@ -13,5 +13,5 @@ bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] } hex = "0.4.3" md-5 = "0.10" once_cell = "1.12" -regex = "1.6.0" +regex = "1.9.2" thiserror = "1.0.43"