[Numpy-tickets] [NumPy] #551: numpy.ndarray messed up after unpickling

NumPy numpy-tickets@scipy....
Sun Apr 13 06:36:53 CDT 2008

#551: numpy.ndarray messed up after unpickling
 Reporter:  cotackst                   |        Owner:  somebody
     Type:  defect                     |       Status:  new     
 Priority:  normal                     |    Milestone:  1.0.5   
Component:  numpy.core                 |      Version:  1.0.1   
 Severity:  critical                   |   Resolution:          
 Keywords:  pickle, ndarray, segfault  |  
Comment (by pv):

 The user supplied memory here typically comes from python.pickle, which
 the end-user has no control over, so I don't think raising an exception is
 a good idea for this case.

 And yes, do replace "long" by "unsigned long" in the codes,
 ptr += (((unsigned long)ptr) % align) + offset;
 if you meant this, in C % can return negative numbers... (And you can't
 free(ptr) after this, so even this is good only for testing...) Anyway,
 this didn't change the results.

Ticket URL: <http://scipy.org/scipy/numpy/ticket/551#comment:25>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list