[pypy-issue] [issue1510] numpypy argsort segmentation fault

mikefc tracker at bugs.pypy.org
Fri Jun 14 08:46:24 CEST 2013


mikefc <coolbutuseless at gmail.com> added the comment:

Sorry for update flood:

I think the problem is that there are 2 definitions for the size of the numeric value used 
for the index array.

During the malloc,
dtype = interp_dtype.get_dtype_cache(space).w_longdtype
indexes = dtype.itemtype.malloc(size * dtype.get_size())

This dtype has a get_size() of 8.

However, index_stride_size is set to 16, and raw_storage_setitem() and raw_storage_getitem() 
use this value for accessing the raw_storage i.e.
raw_storage_setitem(self.indexes, idx * self.index_stride_size + self.index_start, item[1])


Does this look right at all?

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1510>
________________________________________


More information about the pypy-issue mailing list