From daa7c14a442a2d7dc9a7033340446fa886bab2f7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 14 Jul 2022 10:13:52 -0700 Subject: [PATCH 1/2] Upgrade indexmap and thorin-dwp to use hashbrown 0.12 This removes the last dependencies on hashbrown 0.11. --- Cargo.lock | 41 +++++---------------- compiler/rustc_codegen_cranelift/Cargo.lock | 8 ++-- compiler/rustc_codegen_cranelift/Cargo.toml | 2 +- compiler/rustc_codegen_ssa/Cargo.toml | 2 +- compiler/rustc_data_structures/Cargo.toml | 2 +- compiler/rustc_serialize/Cargo.toml | 2 +- src/tools/bump-stage0/Cargo.toml | 2 +- 7 files changed, 19 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a8d9d40b6e45..3f6620c813ba0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1647,15 +1647,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.12.0" @@ -1822,12 +1813,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown 0.11.2", + "hashbrown", "rustc-rayon", "serde", ] @@ -2494,19 +2485,6 @@ dependencies = [ "rustc-std-workspace-core", ] -[[package]] -name = "object" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" -dependencies = [ - "crc32fast", - "flate2", - "hashbrown 0.11.2", - "indexmap", - "memchr", -] - [[package]] name = "object" version = "0.29.0" @@ -2514,7 +2492,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", - "hashbrown 0.12.0", + "flate2", + "hashbrown", "indexmap", "memchr", ] @@ -4978,7 +4957,7 @@ dependencies = [ "core", "dlmalloc", "fortanix-sgx-abi", - "hashbrown 0.12.0", + "hashbrown", "hermit-abi 0.2.0", "libc", "miniz_oxide", @@ -5207,13 +5186,13 @@ dependencies = [ [[package]] name = "thorin-dwp" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd95b4559c196987c8451b4e14d08a4c796c2844f9adf4d2a2dbc9b3142843be" +checksum = "e6cb0c7868d7f90407531108ab03263d9452a8811b7cdd87675343a40d4aa254" dependencies = [ "gimli 0.26.1", - "hashbrown 0.11.2", - "object 0.28.4", + "hashbrown", + "object 0.29.0", "tracing", ] diff --git a/compiler/rustc_codegen_cranelift/Cargo.lock b/compiler/rustc_codegen_cranelift/Cargo.lock index da18ac7eacbfc..655da407924df 100644 --- a/compiler/rustc_codegen_cranelift/Cargo.lock +++ b/compiler/rustc_codegen_cranelift/Cargo.lock @@ -163,15 +163,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" [[package]] name = "indexmap" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", diff --git a/compiler/rustc_codegen_cranelift/Cargo.toml b/compiler/rustc_codegen_cranelift/Cargo.toml index ec2c1f2ca71b3..ff71d7a209e4d 100644 --- a/compiler/rustc_codegen_cranelift/Cargo.toml +++ b/compiler/rustc_codegen_cranelift/Cargo.toml @@ -19,7 +19,7 @@ gimli = { version = "0.26.0", default-features = false, features = ["write"]} object = { version = "0.27.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] } ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" } -indexmap = "1.8.0" +indexmap = "1.9.1" libloading = { version = "0.6.0", optional = true } once_cell = "1.10.0" smallvec = "1.8.1" diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml index faabea92f5a6c..e7ee424668b86 100644 --- a/compiler/rustc_codegen_ssa/Cargo.toml +++ b/compiler/rustc_codegen_ssa/Cargo.toml @@ -14,7 +14,7 @@ tracing = "0.1" libc = "0.2.50" jobserver = "0.1.22" tempfile = "3.2" -thorin-dwp = "0.2" +thorin-dwp = "0.3" pathdiff = "0.2.0" serde_json = "1.0.59" snap = "1" diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml index 2a801d0e70269..5c641f54f686d 100644 --- a/compiler/rustc_data_structures/Cargo.toml +++ b/compiler/rustc_data_structures/Cargo.toml @@ -9,7 +9,7 @@ doctest = false [dependencies] arrayvec = { version = "0.7", default-features = false } ena = "0.14" -indexmap = { version = "1.8.2" } +indexmap = { version = "1.9.1" } tracing = "0.1" jobserver_crate = { version = "0.1.13", package = "jobserver" } rustc_serialize = { path = "../rustc_serialize" } diff --git a/compiler/rustc_serialize/Cargo.toml b/compiler/rustc_serialize/Cargo.toml index 5056163b7fe7d..dbc5c15195c86 100644 --- a/compiler/rustc_serialize/Cargo.toml +++ b/compiler/rustc_serialize/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.0" edition = "2021" [dependencies] -indexmap = "1.8.0" +indexmap = "1.9.1" smallvec = { version = "1.8.1", features = ["union", "may_dangle"] } [dev-dependencies] diff --git a/src/tools/bump-stage0/Cargo.toml b/src/tools/bump-stage0/Cargo.toml index 352a855561417..758b1b139ade1 100644 --- a/src/tools/bump-stage0/Cargo.toml +++ b/src/tools/bump-stage0/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] anyhow = "1.0.34" curl = "0.4.38" -indexmap = { version = "1.7.0", features = ["serde"] } +indexmap = { version = "1.9.1", features = ["serde"] } serde = { version = "1.0.125", features = ["derive"] } serde_json = { version = "1.0.59", features = ["preserve_order"] } toml = "0.5.7" From 931a8f81fe1e9330ffe6911c2bb006d349e1b2a7 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Sun, 17 Jul 2022 13:23:26 +0200 Subject: [PATCH 2/2] Upgrade hashbrown to 0.12.3 This fixes a double-free in the `clone_from` function if dropping an existing element in the table panics. See https://github.com/rust-lang/hashbrown/pull/348 for more details. --- Cargo.lock | 4 ++-- compiler/rustc_codegen_cranelift/Cargo.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f6620c813ba0..16ebddab974d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1649,9 +1649,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", "compiler_builtins", diff --git a/compiler/rustc_codegen_cranelift/Cargo.lock b/compiler/rustc_codegen_cranelift/Cargo.lock index 655da407924df..2f5d1c0432f55 100644 --- a/compiler/rustc_codegen_cranelift/Cargo.lock +++ b/compiler/rustc_codegen_cranelift/Cargo.lock @@ -163,9 +163,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "indexmap"