Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
Marc Glisse writes: On Sun, 20 Nov 2016, Niels Möller wrote: > It would make sense to test both gmp and mini-gmp with > -fsanitize=undefined. If we are not already doing it, yes, I highly recommend it. It is now running for ivydeb64v9 and ivydeb32v9. Two errors were triggered for

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: Anyway, I can now repro locally, by running make check CFLAGS="-O -Wall -g -fsanitize=undefined -fno-sanitize-recover" in the mini-gmp/tests source directory. This fails with I spent a good number of hours trying to accompish this. 1.

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: For mini-gmp, I hope running the testsuite with a large number of random seeds should give good coverage, so we don't need any additional framework. We should at least make sure the algorithms' corner cases are exercised, e.g., that large quotie

Re: Help stabilising mini-gmp

2016-11-20 Thread Niels Möller
"Marco Bodrato" writes: > Should we implement (or adapt) something like the tests/devel/try thing to > widely test the basic operations in mini-gmp? I think devel/try is mainly for testing assembly code, to find register clobbering bugs and the like. For mini-gmp, I hope running the testsuite w

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I've checked in an update to the html file. But running www-update fails, [nisse@shell /var/hg]$ ./www-update abort: Permission denied: '/var/hg/www/devel/mini-gmp-status.html' Please try again now. Before doing a ww-update, it would

Re: Help stabilising mini-gmp

2016-11-20 Thread Niels Möller
t...@gmplib.org (Torbjörn Granlund) writes: > Good! You're welcome to update the mini-gmp-status.html repo file and > run the web update script. I've checked in an update to the html file. But running www-update fails, [nisse@shell /var/hg]$ ./www-update abort: Permission denied: '/var/hg/

Reorganized mini-gmp/tests/t-signed.

2016-11-20 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Anyway, I can now repro locally, by running > > make check CFLAGS="-O -Wall -g -fsanitize=undefined -fno-sanitize-recover" > > in the mini-gmp/tests source directory. This fails with > > t-signed.c:93:8: runtime error: signed integer overflow: -1

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
> It would make sense to test both gmp and mini-gmp with > -fsanitize=undefined. If we are not already doing it, yes, I highly recommend it. I also highly recommend it and the system noasm should hopefully obey our recommendations in its next run. ;-) (The hardware martin.gmplib.org whi

Re: Help stabilising mini-gmp

2016-11-20 Thread Marc Glisse
On Sun, 20 Nov 2016, Niels Möller wrote: It would make sense to test both gmp and mini-gmp with -fsanitize=undefined. If we are not already doing it, yes, I highly recommend it. -- Marc Glisse ___ gmp-devel mailing list gmp-devel@gmplib.org https://

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
> If the code becomes undefined by gcc's transformations, that it's a > compiler bug. That's not at all what I said, the code doesn't become undefined. I didn't say you said that. :-) "Reminder: computing INT_MIN-1 is forbidden. If you are not doing that, you can ignore this message

Re: Help stabilising mini-gmp

2016-11-20 Thread Niels Möller
Marc Glisse writes: > After inlining, there are subtractions. check_si is called at least > once with oi = si + c (c is ±1). gcc simplifies the test si > si - 1 > to true, and warns that this optimization may break your program if > you rely on wrapping. I suspect this test program relies on it.

Re: Help stabilising mini-gmp

2016-11-20 Thread Marc Glisse
On Sun, 20 Nov 2016, Torbjörn Granlund wrote: Marc Glisse writes: After inlining, there are subtractions. check_si is called at least once with oi = si + c (c is ±1). gcc simplifies the test si > si - 1 Inlining of check_si? Of all the functions. (note that I am just speculating, but the

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
Marc Glisse writes: After inlining, there are subtractions. check_si is called at least once with oi = si + c (c is ±1). gcc simplifies the test si > si - 1 Inlining of check_si? If the code becomes undefined by gcc's transformations, that it's a compiler bug. -- Torbjörn Please encrypt,

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I next tried adding -Wall to the command line flags, and I see gcc -std=gnu99 -m64 -mtune=power7 -O3 -Wall -I../.. -c /home/nisse/hack/gmp/mini-gmp/tests/t-signed.c -o t-signed.o /home/nisse/hack/gmp/mini-gmp/tests/t-signed.c: In functi

Re: Help stabilising mini-gmp

2016-11-20 Thread Marc Glisse
On Sun, 20 Nov 2016, Niels Möller wrote: ni...@lysator.liu.se (Niels Möller) writes: It seems "trivially" reproducible on ppc64 though, both real metal versions and fake ones like ppceb-debv8 (and ppcel-debv8). I'll try to debug (if no one else beats me to it), but not today. I've logged i

Re: Help stabilising mini-gmp

2016-11-20 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: >> It seems "trivially" reproducible on ppc64 though, both real metal >> versions and fake ones like ppceb-debv8 (and ppcel-debv8). > > I'll try to debug (if no one else beats me to it), but not today. I've logged in to ppceb-debv8, and it's easy to rep

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I just pushed an LD_LIBRARY_PATH improvement, we'll see if it reduces the number of failures. The power-aix aka gcc111 failures are gone. The sky.gmplib.org-dyn-fat-fake:64.txt is still there until sky runs again (Tuesday). There used to be over

Re: Help stabilising mini-gmp

2016-11-20 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I think the three red arithmetic bugs (t-gcd, t-powm and t-div) were all caused by the bug in mpn_invert_3by2, so hopefully fixed now. Or have you seen any new failures for those? Good! You're welcome to update the mini-gmp-status.html repo fil

Re: Help stabilising mini-gmp

2016-11-20 Thread Niels Möller
t...@gmplib.org (Torbjörn Granlund) writes: > There are currently 10 outstanding mini-gmp issues according to > , will be 9 if your > LD_LIBRARY_PATH change is effective. Is it up-to-date? I think the three red arithmetic bugs (t-gcd, t-powm and t-d