[pypy-issue] [issue1621] CPyExt: PyObject_GetItem() fails on NumPyPy array objects

Yury V. Zaytsev tracker at bugs.pypy.org
Wed Oct 9 17:06:11 CEST 2013


New submission from Yury V. Zaytsev <yury at shurup.com>:

>>>> import cpyext; cpyext.load_module("test_getitem.so", "test_getitem")
>>>> import test_getitem

>>>> test_getitem.test_getitem( (1,2,3) )
3

>>>> import array
>>>> x = array.array('i'); x.fromlist([1,2,3])
>>>> test_getitem.test_getitem( x )
3

<--- works as expected

>>>> import numpy as np
>>>> z = np.array( (1,2,3) )
>>>> test_getitem.test_getitem( z )
Fatal error in cpyext, CPython compatibility layer, calling PyObject_GetItem
Either report a bug or consider not using this particular extension
<OperationError object at 0x7f4af4af4f40>
RPython traceback:
  File "pypy_module_cpyext_api.c", line 48510, in PyObject_GetItem
  File "pypy_module_cpyext_pyobject.c", line 602, in make_ref
  File "pypy_module_cpyext_pyobject.c", line 1625, in create_ref
  File "pypy_module_cpyext_pyobject.c", line 4535, in BaseCpyTypedescr_allocate
  File "pypy_module_cpyext_pyobject.c", line 602, in make_ref
  File "pypy_module_cpyext_pyobject.c", line 1525, in create_ref
  File "pypy_module_cpyext_typeobject.c", line 19153, in type_attach
  File "pypy_module_cpyext_typeobject.c", line 19902, in best_base
Segmentation fault (core dumped)

<--- FAIL

----------
messages: 6251
nosy: fijal, pypy-issue, zaytsev
priority: bug
release: ???
status: unread
title: CPyExt: PyObject_GetItem() fails on NumPyPy array objects

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


More information about the pypy-issue mailing list