guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49880] [PATCH 2/2] gnu: gmp-boot: Fix t-scan test crash


From: Thiago Jung Bauermann
Subject: [bug#49880] [PATCH 2/2] gnu: gmp-boot: Fix t-scan test crash
Date: Wed, 4 Aug 2021 15:41:28 -0300

GMP 4.3 was released with a bug in the t-scan test which causes it to crash
with a segmentation fault. Backport fix from upstream.

* gnu/packages/commencement.scm (gmp-boot): Apply
gmp-4.3-fix-t-scan-test.patch.
* gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch: New file.
---

Hello,

With this and the previous patch applied, gmp-boot builds successfully
on powerpc64le-linux both in master and core-updates-frozen.

It should also fix the same problem in i686-linux:

https://ci.guix.gnu.org/build/699347/details

 gnu/packages/commencement.scm                 |  4 +++-
 .../patches/gmp-4.3-fix-t-scan-test.patch     | 24 +++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ae3f07bc59ef..16eb46d44d77 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1840,7 +1840,9 @@ ac_cv_c_float_format='IEEE (little-endian)'
               (uri (string-append "mirror://gnu/gmp/gmp-" version
                                   ".tar.gz"))
               (sha256 (base32
-                       
"15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv"))))
+                       "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv"))
+              ;; See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60933#c11
+              (patches (search-patches "gmp-4.3-fix-t-scan-test.patch"))))
     (arguments
      (substitute-keyword-arguments (package-arguments gmp)
        ((#:configure-flags gmp-configure-flags)
diff --git a/gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch 
b/gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch
new file mode 100644
index 000000000000..85b4b666215a
--- /dev/null
+++ b/gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch
@@ -0,0 +1,24 @@
+Testcase fix obtained from upstream at:
+
+https://gmplib.org/repo/gmp/raw-rev/966737bd91ed
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1318259187 -7200
+# Node ID 966737bd91ed4cd158ca9730167f70db47442fc1
+# Parent  27913f466a23776215bd9341866e10a50cf61c01
+(check_ref): Fix loop end bound.
+
+diff -r 27913f466a23 -r 966737bd91ed tests/mpz/t-scan.c
+--- a/tests/mpz/t-scan.c       Mon Oct 10 12:06:39 2011 +0200
++++ b/tests/mpz/t-scan.c       Mon Oct 10 17:06:27 2011 +0200
+@@ -79,7 +79,7 @@
+ 
+               for (isize = 0; isize <= size; isize++)
+                 {
+-                  for (oindex = 0; oindex <= numberof (offset); oindex++)
++                  for (oindex = 0; oindex < numberof (offset); oindex++)
+                     {
+                       o = offset[oindex];
+                       if ((int) isize*GMP_NUMB_BITS < -o)
+





reply via email to

[Prev in Thread] Current Thread [Next in Thread]