diff --git a/9c3a8a8.patch b/9c3a8a8.patch new file mode 100644 index 0000000..533c5d5 --- /dev/null +++ b/9c3a8a8.patch @@ -0,0 +1,26 @@ +From 4b1ce50d67b92ae3c9434455397f86c37df287bd Mon Sep 17 00:00:00 2001 +From: Jeehoon Kang +Date: Fri, 13 Nov 2020 01:22:35 +0900 +Subject: [PATCH] Fix a bug in seq_lock_wide (closes #595) + +--- + crossbeam-utils/src/atomic/seq_lock_wide.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/crossbeam-utils/src/atomic/seq_lock_wide.rs b/crossbeam-utils/src/atomic/seq_lock_wide.rs +index faabc1b72..871a93d28 100644 +--- a/crossbeam-utils/src/atomic/seq_lock_wide.rs ++++ b/crossbeam-utils/src/atomic/seq_lock_wide.rs +@@ -1,3 +1,4 @@ ++use core::mem; + use core::sync::atomic::{self, AtomicUsize, Ordering}; + + use crate::Backoff; +@@ -110,6 +111,7 @@ impl SeqLockWriteGuard { + #[inline] + pub fn abort(self) { + self.lock.state_lo.store(self.state_lo, Ordering::Release); ++ mem::forget(self); + } + } + diff --git a/rust-crossbeam-utils.spec b/rust-crossbeam-utils.spec index 3fde8f8..917028f 100644 --- a/rust-crossbeam-utils.spec +++ b/rust-crossbeam-utils.spec @@ -6,7 +6,7 @@ Name: rust-%{crate} Version: 0.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utilities for concurrent programming # Upstream license specification: MIT OR Apache-2.0 @@ -14,6 +14,9 @@ License: MIT or ASL 2.0 URL: https://crates.io/crates/crossbeam-utils Source: %{crates_source} +# upstream patch to fix locking issues on 32-bit architectures with 0.8.0 +Patch0: https://github.com/crossbeam-rs/crossbeam/commit/9c3a8a8.patch + ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} BuildArch: noarch @@ -89,7 +92,7 @@ which use "std" feature of "%{crate}" crate. %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p2 %cargo_prep %generate_buildrequires @@ -107,6 +110,9 @@ which use "std" feature of "%{crate}" crate. %endif %changelog +* Thu Nov 12 2020 Fabio Valentini - 0.8.0-2 +- Include upstream patch to fix locking issues on 32-bit architectures. + * Thu Nov 12 2020 Fabio Valentini - 0.8.0-1 - Update to version 0.8.0. - Fixes RHBZ#1887300