#6453: [with patch, needs review] MPFR test failures on Solaris 10 update 4 on
host 't2'
----------------------+-----------------------------------------------------
Reporter: drkirkby | Owner: drkirkby
Type: defect | Status: assigned
Priority: major | Milestone: sage-4.1.1
Component: solaris | Keywords: compiler bug
Reviewer: | Author: Paul Zimmermann, David Kirkby
Merged: |
----------------------+-----------------------------------------------------
Comment(by drkirkby):
This looks more and more like a Solaris bug, as the following bit of code,
compiled in 32-bit mode should add the number 2 raised to the power of 31
to another number of 2 raised to the power of 31 so get a total of 2
raised to the power of 32, which is 0 in 32-bit mode. But it dumps core on
't2', and not on my Sun Blade 2000 or any other non-Solaris machine for
which people have tested this.
[ You might wonder why I spelled out 'raised to the power of' but the
formatting goes a bit crazy if I write 2^31 plus 2^31 is equal to 2^32)
perhaps you see that]
It also dumps core with the Sun compiler.
{{{
kir...@t2:[~] $ /opt/SUNWspro/bin/cc check4.c
kir...@t2:[~] $ ./a.out
n=0
n=1
Abort (core dumped)
kir...@t2:[~] $ cat check4.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
volatile size_t i = 0x80000000U, j = 0x80000000U;
char buf[16];
int main (void)
{
int n;
for (n=0 ; n <=10;++n) {
printf("n=%d\n",n);
if (sizeof (size_t) != 4)
return 0;
buf[n] = 6;
memset (buf+n, 0, i + j);
if (buf[n] != 6)
abort ();
}
return 0;
}
}}}
I still believe in the short term, the fix here should be applied. Even if
it can't be guaranteed to work in every case, it is allows MPFR to build
and pasts all the tests, it will allow progress to be made in Sage.
The fact I have been careful to only apply this to sun4v machines, should
ensure it has no impact on anywhere else.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6453#comment:10>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---