public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Susi Lehtola <jussilehtola@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pyscf] rawhide: Add another patch
Date: Sat, 01 Aug 2026 14:56:37 GMT	[thread overview]
Message-ID: <178559619763.1.578266026594302358.rpms-python-pyscf-9eed60f81ece@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-pyscf
Branch : rawhide
Commit : 9eed60f81eceabb955399a07508fdb5a85b4a4b6
Author : Susi Lehtola <jussilehtola@fedoraproject.org>
Date   : 2026-08-01T14:56:29+00:00
Stats  : +50/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pyscf/c/9eed60f81eceabb955399a07508fdb5a85b4a4b6?branch=rawhide

Log:
Add another patch

---
diff --git a/pyscf-2.14.0-dhf-dms-cond.patch b/pyscf-2.14.0-dhf-dms-cond.patch
new file mode 100644
index 0000000..40f05d3
--- /dev/null
+++ b/pyscf-2.14.0-dhf-dms-cond.patch
@@ -0,0 +1,44 @@
+--- a/pyscf/lib/vhf/r_direct_o1.c	2026-08-01 13:42:32.525686976 +0000
++++ b/pyscf/lib/vhf/r_direct_o1.c	2026-08-01 13:42:58.351727499 +0000
+@@ -95,7 +95,12 @@
+         int idm, ksh, lsh, dk, dl, dijkl;
+         int shls[4];
+         double complex *pv;
+-        double *dms_cond[n_dm+1];
++        /* CVHFrkbssll_vkscreen fills 3*((n_dm+2)/3) entries, which is
++         * n_dm+2 when n_dm is not a multiple of 3.  That happens in the
++         * hermi=0 branch of dhf._call_veff_ssll, where n_dm is 4 times the
++         * number of density matrices.  Size the array for the worst case;
++         * n_dm+1 overflows the stack. */
++        double *dms_cond[n_dm+2];
+         double dm_atleast;
+         void (*pf)();
+ 
+@@ -145,7 +150,12 @@
+         int idm, ksh, lsh, dk, dl, dijkl;
+         int shls[4];
+         double complex *pv;
+-        double *dms_cond[n_dm+1];
++        /* CVHFrkbssll_vkscreen fills 3*((n_dm+2)/3) entries, which is
++         * n_dm+2 when n_dm is not a multiple of 3.  That happens in the
++         * hermi=0 branch of dhf._call_veff_ssll, where n_dm is 4 times the
++         * number of density matrices.  Size the array for the worst case;
++         * n_dm+1 overflows the stack. */
++        double *dms_cond[n_dm+2];
+         double dm_atleast;
+         void (*pf)();
+ 
+@@ -224,7 +234,12 @@
+         int idm, ksh, lsh, dk, dl, dijkl;
+         int shls[4];
+         double complex *pv;
+-        double *dms_cond[n_dm+1];
++        /* CVHFrkbssll_vkscreen fills 3*((n_dm+2)/3) entries, which is
++         * n_dm+2 when n_dm is not a multiple of 3.  That happens in the
++         * hermi=0 branch of dhf._call_veff_ssll, where n_dm is 4 times the
++         * number of density matrices.  Size the array for the worst case;
++         * n_dm+1 overflows the stack. */
++        double *dms_cond[n_dm+2];
+         double dm_atleast;
+         void (*pf)();
+ 

diff --git a/python-pyscf.spec b/python-pyscf.spec
index d65be07..5c26221 100644
--- a/python-pyscf.spec
+++ b/python-pyscf.spec
@@ -29,7 +29,11 @@ Patch1:         pyscf-2.14.0-rpath.patch
 Patch2:         2273.patch
 # Skip tests that need integrals qcint does not implement, and relax two
 # tolerances that are tighter than the numerics of the tests allow
+# Tolerances in https://github.com/pyscf/pyscf/pull/3368; missing integrals in https://github.com/sunqm/qcint/pull/24
 Patch3:         pyscf-2.14.0-tests.patch
+# Fix a stack buffer overflow in the Dirac-Hartree-Fock (SS|LL) J/K build,
+# which segfaults on s390x. https://github.com/pyscf/pyscf/pull/3369
+Patch4:         pyscf-2.14.0-dhf-dms-cond.patch
 
 # i686 disabled since this is a leaf package; see
 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
@@ -99,6 +103,7 @@ chemistry programs.
 %patch 1 -p1 -b .rpath
 %patch 2 -p1 -b .2273
 %patch 3 -p1 -b .tests
+%patch 4 -p1 -b .dmscond
 
 # Remove shebangs
 find pyscf -name \*.py -exec sed -i '/#!\/usr\/bin\/env /d' '{}' \;
@@ -139,6 +144,7 @@ bash .github/workflows/run_tests.sh
 %changelog
 * Sat Aug 01 2026 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.14.0-2
 - Enable tests, patching the suite to pass with qcint and FlexiBLAS.
+- Fix a stack buffer overflow in the Dirac-Hartree-Fock (SS|LL) J/K build.
 
 * Thu Jul 30 2026 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.14.0-1
 - Update to 2.14.0.

                 reply	other threads:[~2026-08-01 14:56 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=178559619763.1.578266026594302358.rpms-python-pyscf-9eed60f81ece@fedoraproject.org \
    --to=jussilehtola@fedoraproject.org \
    --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