public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/hipsparse] rawhide: Fix tests
@ 2026-09-29 20:16 Tom Rix
0 siblings, 0 replies; only message in thread
From: Tom Rix @ 2026-09-29 20:16 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/hipsparse
Branch : rawhide
Commit : 761a216246af45c8dd7e20331338a287ffaa728b
Author : Tom Rix <Tom.Rix@amd.com>
Date : 2026-09-29T13:15:58-07:00
Stats : +50/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/hipsparse/c/761a216246af45c8dd7e20331338a287ffaa728b?branch=rawhide
Log:
Fix tests
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
---
diff --git a/0001-fix-bounds-check-in-gen_matrix_coo-to-prevent-out-of.patch b/0001-fix-bounds-check-in-gen_matrix_coo-to-prevent-out-of.patch
new file mode 100644
index 0000000..452aa00
--- /dev/null
+++ b/0001-fix-bounds-check-in-gen_matrix_coo-to-prevent-out-of.patch
@@ -0,0 +1,42 @@
+From 3ce3dd1da4f8a3c78d1b52d98c6c920341659704 Mon Sep 17 00:00:00 2001
+From: Tom Rix <Tom.Rix@amd.com>
+Date: Tue, 29 Sep 2026 09:29:01 -0700
+Subject: [PATCH] fix: bounds check in gen_matrix_coo to prevent out-of-bounds
+ access with strict STL
+
+- Add rng >= nnz check to prevent invalid vector index in check[] and col_ind[]
+- Replace deprecated raw pointer sort with iterator-based bounds-checked sort
+- Fixes SIGABRT on Fedora's strict libstdc++ during quick/bsrxmv tests
+---
+ projects/hipsparse/clients/include/utility.hpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/projects/hipsparse/clients/include/utility.hpp b/projects/hipsparse/clients/include/utility.hpp
+index b8754fbef2ab..3b4c87bccace 100644
+--- a/projects/hipsparse/clients/include/utility.hpp
++++ b/projects/hipsparse/clients/include/utility.hpp
+@@ -938,7 +938,7 @@ void gen_matrix_coo(I m,
+ }
+
+ // Repeat if running out of bounds
+- if(rng < 0 || rng > n - 1)
++ if(rng < 0 || rng > n - 1 || rng >= nnz)
+ {
+ continue;
+ }
+@@ -959,7 +959,11 @@ void gen_matrix_coo(I m,
+ }
+
+ // Partially sort column indices
+- std::sort(&col_ind[begin], &col_ind[i]);
++ if (i <= static_cast<I>(col_ind.size())) {
++ std::sort(col_ind.begin() + begin, col_ind.begin() + i);
++ } else {
++ std::sort(col_ind.begin() + begin, col_ind.end());
++ }
+ }
+ }
+
+--
+2.55.0
+
diff --git a/hipsparse.spec b/hipsparse.spec
index a6b42f0..ae2055e 100644
--- a/hipsparse.spec
+++ b/hipsparse.spec
@@ -98,7 +98,7 @@ Version: %{rocm_version}
%if %{with preview}
Release: 0%{?dist}
%else
-Release: 1%{?dist}
+Release: 2%{?dist}
%endif
Summary: ROCm SPARSE marshaling library
License: MIT
@@ -106,6 +106,9 @@ URL: https://github.com/ROCm/rocm-libraries
Source0: %{url}/releases/download/%{pkg_src}/%{upstreamname}.tar.gz#/%{upstreamname}-%{version}.tar.gz
+# https://github.com/ROCm/rocm-libraries/pull/12739
+Patch1: 0001-fix-bounds-check-in-gen_matrix_coo-to-prevent-out-of.patch
+
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -191,7 +194,7 @@ Requires: rocm-filesystem%{pkg_suffix}
%endif
%prep
-%autosetup -p1 -n %{upstreamname}
+%autosetup -p3 -n %{upstreamname}
# A better default for the matrices dir
sed -i -e 's@hipsparse_exepath() + "../matrices/"@"%{pkg_prefix}/share/hipsparse/matrices/"@' clients/include/utility.hpp
@@ -340,6 +343,9 @@ chrpath -r %{pkg_prefix}/%{pkg_libdir} %{buildroot}%{pkg_prefix}/%{pkg_libdir}/l
%endif
%changelog
+* Tue Sep 29 2026 Tom Rix <Tom.Rix@amd.com> - 10.0.0-2
+- Fix tests
+
* Sun Sep 20 2026 Tom Rix <Tom.Rix@amd.com> - 10.0.0-1
- Update to 10.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-29 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 20:16 [rpms/hipsparse] rawhide: Fix tests Tom Rix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox