include upstream patch to fix locking issues on 32-bit architectures

epel9
Fabio Valentini 4 years ago
parent 6000387b9b
commit 3c09627e5a
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -0,0 +1,26 @@
From 4b1ce50d67b92ae3c9434455397f86c37df287bd Mon Sep 17 00:00:00 2001
From: Jeehoon Kang <jeehoon.kang@kaist.ac.kr>
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);
}
}

@ -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 <decathorpe@gmail.com> - 0.8.0-2
- Include upstream patch to fix locking issues on 32-bit architectures.
* Thu Nov 12 2020 Fabio Valentini <decathorpe@gmail.com> - 0.8.0-1
- Update to version 0.8.0.
- Fixes RHBZ#1887300

Loading…
Cancel
Save