Update to version 0.14.5; Fixes RHBZ#2277634

epel10
Fabio Valentini 8 months ago
parent f1242022c7
commit 1ce1d30de1
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -20,3 +20,4 @@
/hashbrown-0.14.1.crate /hashbrown-0.14.1.crate
/hashbrown-0.14.2.crate /hashbrown-0.14.2.crate
/hashbrown-0.14.3.crate /hashbrown-0.14.3.crate
/hashbrown-0.14.5.crate

@ -1,36 +0,0 @@
From 1fa1dcca990d4e9d112f154c83802167f69f4fe9 Mon Sep 17 00:00:00 2001
From: Amanieu d'Antras <amanieu@gmail.com>
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<T: Clone, A: Allocator + Clone> RawTable<T, A> {
// 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<T: Clone, A: Allocator + Clone> RawTable<T, A> {
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.

@ -1,11 +1,11 @@
# Generated by rust2rpm 25 # Generated by rust2rpm 26
%bcond_without check %bcond_without check
%global debug_package %{nil} %global debug_package %{nil}
%global crate hashbrown %global crate hashbrown
Name: rust-hashbrown Name: rust-hashbrown
Version: 0.14.3 Version: 0.14.5
Release: %autorelease Release: %autorelease
Summary: Rust port of Google's SwissTable hash map 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 URL: https://crates.io/crates/hashbrown
Source: %{crates_source} 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 BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand: %global _description %{expand:

@ -1 +1 @@
SHA512 (hashbrown-0.14.3.crate) = 4d344e5c89ce58e04668b80ef10e4e110a3a5daf4d610c52d980577795d0e2050c7d0b151d8ba97128117665e27b92ab0300f85b88bd6e1de943c62d49249356 SHA512 (hashbrown-0.14.5.crate) = 215ea860bd3de80e2dd2d4647c9dd31c0ac895ea7c08b87256dc11d36407e412ffefaebc6cdbec024057dd4f24b3762b4fe427be307e15d1e68ccfde89a99742

Loading…
Cancel
Save