#11705: Port Sage to SUSE Linux Power 7 (ppc64).
-------------------------------+--------------------------------------------
       Reporter:  was          |         Owner:  drkirkby
           Type:  enhancement  |        Status:  new     
       Priority:  major        |     Milestone:  sage-5.0
      Component:  porting      |    Resolution:          
       Keywords:  sd32 sd35.5  |   Work issues:          
Report Upstream:  N/A          |     Reviewers:          
        Authors:               |     Merged in:          
   Dependencies:               |      Stopgaps:          
-------------------------------+--------------------------------------------

Comment (by zimmerma):

 I believe I understand what happens. The fact that {{{__pyx_t_3}}} has the
 wrong type is not a problem,
 since it is a pointer, like what {{{mpz_t}}} expects as 2nd (and 3rd)
 argument of {{{mpfi_interv_z}}}.

 However my guess is that the {{{__Pyx_INCREF(__pyx_t_3)}}} call is
 intended to increase a reference counter stored somewhere in the
 {{{PyObject}}} struct. Since {{{__pyx_v_integ->value}}} is not a Python
 object but a {{{mpz_t}}}, this call makes a side effect on the {{{mpz_t}}}
 structure, which has the
 effect to increase its "size" from 1 to 2, which explains why the
 {{{mpz_t}}} object seen by
 {{{mpfi_interv_z}}} is corrupted.

 What is annoying is that this corruption **also happens** on other
 configurations (in particular
 little endian). For some reason it gets unnoticed, maybe because the
 corrupted field is not the size
 (maybe the allocated size). However one might be able to reproduce the
 problem also by changing the
 order of the fields in the {{{mpz_t}}} structure in {{{gmp.h}}}. Putting
 {{{_mp_size}}} first seems to
 break Sage on 64-bit Intel processors.

 Paul

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11705#comment:68>
Sage <http://www.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.

Reply via email to