From 1ce1d30de1b59867062f66113e4b6264540ae020 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 8 May 2024 20:30:59 +0200 Subject: [PATCH] Update to version 0.14.5; Fixes RHBZ#2277634 --- .gitignore | 1 + 1fa1dcc.patch | 36 ------------------------------------ rust-hashbrown.spec | 7 ++----- sources | 2 +- 4 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 1fa1dcc.patch diff --git a/.gitignore b/.gitignore index 0226b8f..c16ac2e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /hashbrown-0.14.1.crate /hashbrown-0.14.2.crate /hashbrown-0.14.3.crate +/hashbrown-0.14.5.crate diff --git a/1fa1dcc.patch b/1fa1dcc.patch deleted file mode 100644 index b27eb8b..0000000 --- a/1fa1dcc.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1fa1dcca990d4e9d112f154c83802167f69f4fe9 Mon Sep 17 00:00:00 2001 -From: Amanieu d'Antras -Date: Mon, 4 Mar 2024 17:38:02 +0000 -Subject: [PATCH] Fix index calculation in panic guard of clone_from_impl - -Previously, it was possible for an uninitialized element to be dropped -if all of the following occurred: -- `clone_from` was called where `T: !Copy`. -- The `clone` implementation of `T` panicked. -- The first bucket of the source `HashMap` contained an entry. ---- - src/raw/mod.rs | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/raw/mod.rs b/src/raw/mod.rs -index ddd4fe7c1..22c01f5e9 100644 ---- a/src/raw/mod.rs -+++ b/src/raw/mod.rs -@@ -3582,7 +3582,7 @@ impl RawTable { - // cloned so far. - let mut guard = guard((0, &mut *self), |(index, self_)| { - if T::NEEDS_DROP { -- for i in 0..=*index { -+ for i in 0..*index { - if self_.is_bucket_full(i) { - self_.bucket(i).drop(); - } -@@ -3596,7 +3596,7 @@ impl RawTable { - to.write(from.as_ref().clone()); - - // Update the index in case we need to unwind. -- guard.0 = index; -+ guard.0 = index + 1; - } - - // Successfully cloned all items, no need to clean up. diff --git a/rust-hashbrown.spec b/rust-hashbrown.spec index 1ce753a..f36eb12 100644 --- a/rust-hashbrown.spec +++ b/rust-hashbrown.spec @@ -1,11 +1,11 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate hashbrown Name: rust-hashbrown -Version: 0.14.3 +Version: 0.14.5 Release: %autorelease Summary: Rust port of Google's SwissTable hash map @@ -13,9 +13,6 @@ License: MIT OR Apache-2.0 URL: https://crates.io/crates/hashbrown Source: %{crates_source} -# upstream patch to avoid dropping uninitialized memory in some cases -Patch: https://github.com/rust-lang/hashbrown/commit/1fa1dcc.patch - BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: diff --git a/sources b/sources index 14d19e1..d75ca7a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hashbrown-0.14.3.crate) = 4d344e5c89ce58e04668b80ef10e4e110a3a5daf4d610c52d980577795d0e2050c7d0b151d8ba97128117665e27b92ab0300f85b88bd6e1de943c62d49249356 +SHA512 (hashbrown-0.14.5.crate) = 215ea860bd3de80e2dd2d4647c9dd31c0ac895ea7c08b87256dc11d36407e412ffefaebc6cdbec024057dd4f24b3762b4fe427be307e15d1e68ccfde89a99742