t-scan from GMP-4.3.2 [was: t-lucnum_ui segfaults]

2021-02-28 Thread Marco Bodrato

Ciao,

Il 2021-02-28 20:41 Paul Dufresne ha scritto:

PASS: t-lucnum_ui


t-lucnum_ui does not segfault, it passes.

/bin/bash : ligne 4 : 116921 Erreur de segmentation  (core dumped) 
${dir}$tst


FAIL: t-scan


t-scan triggers the error.

make[2] : on quitte le répertoire 
« /home/paul/gpc2/gcc-4.6.4/gmp-4.3.2/tests »


If you really want to use that 10 years old release, you may try this 
9.5 years old patch (to the test, not to the library): 
https://gmplib.org/repo/gmp/rev/966737bd91ed


# HG changeset patch
# User Torbjorn Granlund
# 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.cMon Oct 10 12:06:39 2011 +0200
+++ b/tests/mpz/t-scan.cMon 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)


Ĝis,
m
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


t-lucnum_ui segfaults

2021-02-28 Thread Paul Dufresne
make  check-TESTS

make[4] : on entre dans le répertoire « 
/home/paul/gpc2/gcc-4.6.4/gmp-4.3.2/tests/mpz »

PASS: t-addsub

PASS: t-cmp

PASS: t-mul

PASS: t-mul_i

PASS: t-tdiv

PASS: t-tdiv_ui

PASS: t-fdiv

PASS: t-fdiv_ui

PASS: t-cdiv_ui

PASS: t-gcd

PASS: t-gcd_ui

PASS: t-lcm

PASS: dive

PASS: dive_ui

PASS: t-sqrtrem

PASS: convert

PASS: io

PASS: t-inp_str

PASS: logic

PASS: bit

PASS: t-powm

PASS: t-powm_ui

PASS: t-pow

PASS: t-div_2exp

PASS: reuse

PASS: t-root

PASS: t-perfsqr

PASS: t-perfpow

PASS: t-jac

PASS: t-bin

PASS: t-get_d

PASS: t-get_d_2exp

PASS: t-get_si

PASS: t-set_d

PASS: t-set_si

PASS: t-fac_ui

PASS: t-fib_ui

PASS: t-lucnum_ui

/bin/bash : ligne 4 : 116921 Erreur de segmentation  (core dumped) ${dir}$tst

FAIL: t-scan

PASS: t-fits

PASS: t-divis

PASS: t-divis_2exp

PASS: t-cong

PASS: t-cong_2exp

PASS: t-sizeinbase

PASS: t-set_str

PASS: t-aorsmul

PASS: t-cmp_d

PASS: t-cmp_si

PASS: t-hamdist

PASS: t-oddeven

PASS: t-popcount

PASS: t-set_f

PASS: t-io_raw

PASS: t-import

PASS: t-export

PASS: t-pprime_p

PASS: t-nextprime



1 of 58 tests failed

Please report to mailto:gmp-bugs@gmplib.org



make[4]: *** [Makefile:1004 : check-TESTS] Erreur 1

make[4] : on quitte le répertoire « 
/home/paul/gpc2/gcc-4.6.4/gmp-4.3.2/tests/mpz »

make[3]: *** [Makefile:1105 : check-am] Erreur 2

make[3] : on quitte le répertoire « 
/home/paul/gpc2/gcc-4.6.4/gmp-4.3.2/tests/mpz »

make[2]: *** [Makefile:505 : check-recursive] Erreur 1

make[2] : on quitte le répertoire « /home/paul/gpc2/gcc-4.6.4/gmp-4.3.2/tests »

make[1]: *** [Makefile:925 : check-recursive] Erreur 1

make[1] : on quitte le répertoire « /home/paul/gpc2/gcc-4.6.4/gmp-4.3.2 »

make: *** [Makefile:1183 : check] Erreur 2


paul@jacko:~/gpc2/gcc-4.6.4/gmp-4.3.2$ gcc --version

gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0



paul@jacko:~/gpc2/gcc-4.6.4/gmp-4.3.2$ uname -a

Linux jacko 5.8.0-44-generic #50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021 x86_64 
x86_64 x86_64 GNU/Linux

paul@jacko:~/gpc2/gcc-4.6.4/gmp-4.3.2$
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: t-lucnum_ui segfaults

2021-02-28 Thread Torbjörn Granlund
Paul Dufresne  writes:

  make[4] : on entre dans le répertoire « 
/home/paul/gpc2/gcc-4.6.4/gmp-4.3.2/tests/mpz »

Are you seriously using GMP 4.3.2?  It is 11 years old!  Please use some
slightly less obsolete release.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Warning when using gmp 64 bits in vcpkg

2021-02-28 Thread Torbjörn Granlund
Cristofer Martins  writes:

  The warning is as follows(MSVC) "warning C4146: unary minus operator
  applied to unsigned type, result still unsigned"
  Line 2240 inside gmp.h code "*__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;"
  I hope its fixed since its create warnings for all files that includes gmp.h

No this is not "fixed" in GMP.  Negation is completely well-defined for
unsigned types.  If some compiler warns about negation, use a better
compiler, or else try to disable this bogus warning.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Warning when using gmp 64 bits in vcpkg

2021-02-28 Thread Cristofer Martins
The warning is as follows(MSVC) "warning C4146: unary minus operator applied to 
unsigned type, result still unsigned"
Line 2240 inside gmp.h code "*__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK;"
I hope its fixed since its create warnings for all files that includes gmp.h
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs