t-scan test crashes, mpir 2.6.0, mac os x, gcc 4.8.0

355 views
Skip to first unread message

Daniel R. Grayson

unread,
Apr 2, 2013, 10:58:33 AM4/2/13
to mpir-...@googlegroups.com
The t-scan test crashes, in mpir 2.6.0, under mac os x, with gcc 4.8.0.

/bin/sh: line 1: 73249 Segmentation fault: 11  "$tst" > t-scan.log-t 2>&1
FAIL: t-scan


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/encap/gcc-trunk/libexec/gcc/x86_64-apple-darwin12.0.0/4.8.0/lto-wrapper
Target: x86_64-apple-darwin12.0.0
Configured with: ../trunk/configure --prefix=/usr/local/encap/gcc-trunk --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 20120805 (experimental) (GCC) 

leif

unread,
Apr 2, 2013, 11:16:13 AM4/2/13
to mpir-...@googlegroups.com, Daniel R. Grayson
Haven't tried on Darwin yet, but GCC 4.8.0 (final) has been released on
March 22nd.


-leif

--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail

leif

unread,
Apr 2, 2013, 12:21:55 PM4/2/13
to Daniel R. Grayson, mpir-...@googlegroups.com
Daniel R. Grayson wrote:
> I'll try it.

Sorry, I was probably a bit too quick...


> On Tue, Apr 2, 2013 at 11:16 AM, leif <not.r...@online.de
> <mailto:not.r...@online.de>> wrote:
>
> Daniel R. Grayson wrote:
>
> The t-scan test crashes, in mpir 2.6.0, under mac os x, with gcc
> 4.8.0.
>
> /bin/sh: line 1: 73249 Segmentation fault: 11 "$tst" >
> t-scan.log-t 2>&1
> FAIL: t-scan

Confirmed on Linux x86_64, released FSF GCC 4.8.0, default CFLAGS.

Note that mpz/t-scan segfaults, mpn/t-scan passes (for me).


-leif


> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/__local/encap/gcc-trunk/libexec/__gcc/x86_64-apple-darwin12.0.0/__4.8.0/lto-wrapper
> Target: x86_64-apple-darwin12.0.0
> Configured with: ../trunk/configure
> --prefix=/usr/local/encap/gcc-__trunk

Bill Hart

unread,
Apr 2, 2013, 12:27:40 PM4/2/13
to mpir-devel
Thanks for letting us know.

I couldn't even take a guess at this stage, other than a new compiler bug. But I've added it to the list of things that need fixing.

Bill.



--
You received this message because you are subscribed to the Google Groups "mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+...@googlegroups.com.
To post to this group, send email to mpir-...@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

leif

unread,
Apr 2, 2013, 12:54:53 PM4/2/13
to mpir-...@googlegroups.com
Bill Hart wrote:
> Thanks for letting us know.
>
> I couldn't even take a guess at this stage, other than a new compiler
> bug. But I've added it to the list of things that need fixing.

Oh, that's a really hard one:

--- mpir-2.6.0/tests/mpz/t-scan.c.orig 2012-10-03 22:07:32.000000000 +0200
+++ mpir-2.6.0/tests/mpz/t-scan.c 2013-04-02 18:39:17.704366985 +0200
@@ -84,7 +84,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)


With that, all tests pass for me with GCC 4.8.0, with --enable-cxx, both
with default CFLAGS as well as with '-O3' (and -march=...).


-leif


P.S.: I'll open a Sage trac ticket for that... ;-)


> On 2 April 2013 15:58, Daniel R. Grayson <d...@math.uiuc.edu
> <mailto:d...@math.uiuc.edu>> wrote:
>
> The t-scan test crashes, in mpir 2.6.0, under mac os x, with gcc 4.8.0.
>
> /bin/sh: line 1: 73249 Segmentation fault: 11 "$tst" > t-scan.log-t
> 2>&1
> FAIL: t-scan
>
>
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/local/encap/gcc-trunk/libexec/gcc/x86_64-apple-darwin12.0.0/4.8.0/lto-wrapper
> Target: x86_64-apple-darwin12.0.0
> Configured with: ../trunk/configure
> --prefix=/usr/local/encap/gcc-trunk --enable-languages=c,c++
> Thread model: posix
> gcc version 4.8.0 20120805 (experimental) (GCC)


--

Bill Hart

unread,
Apr 2, 2013, 1:41:21 PM4/2/13
to mpir-devel
Wow! That bug is at least 10 years old!!

Bill.


--
You received this message because you are subscribed to the Google Groups "mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscribe@googlegroups.com.

Daniel R. Grayson

unread,
Apr 2, 2013, 10:50:12 PM4/2/13
to mpir-...@googlegroups.com
Thanks!  It works at this end.
Reply all
Reply to author
Forward
0 new messages