#13151: fix pickling of Matrix_modn_dense_double on Solaris (Mark)
----------------------------+-----------------------------------------------
       Reporter:  malb      |         Owner:  was     
           Type:  defect    |        Status:  new     
       Priority:  major     |     Milestone:  sage-5.2
      Component:  pickling  |    Resolution:          
       Keywords:            |   Work issues:          
Report Upstream:  N/A       |     Reviewers:          
        Authors:            |     Merged in:          
   Dependencies:            |      Stopgaps:          
----------------------------+-----------------------------------------------

Comment (by jdemeyer):

 eplying to [comment:2 vbraun]:
 > I tried `gcc -munaligned-doubles` but that didn't help.
 >
 > The problem seems to be that malloc on 32-bit SPARC solaris generally
 returns 4-byte aligned buffers.
 That's not necessarily the case.  The string `<char*>s` isn't directly
 generated from a `malloc`, instead it is the result of a
 `PyString_AsString()` call.  That isn't guaranteed to be 8-bytes aligned.

 The obvious solution is to allocate a buffer ourselves, fill that and pass
 the result to `PyString_FromStringAndSize(buf, size)`. This will cause an
 extra `memcpy()` but that might be unavoidable.

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