public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tom Rix <Tom.Rix@amd.com>
To: git-commits@fedoraproject.org
Subject: [rpms/hipsparse] rawhide: Fix tests
Date: Tue, 29 Sep 2026 20:16:23 GMT [thread overview]
Message-ID: <179071298336.1.15468171165008999746.rpms-hipsparse-761a216246af@fedoraproject.org> (raw)
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
reply other threads:[~2026-09-29 20:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179071298336.1.15468171165008999746.rpms-hipsparse-761a216246af@fedoraproject.org \
--to=tom.rix@amd.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox