New issue 2266: cpyext eats items in call args
https://bitbucket.org/pypy/pypy/issues/2266/cpyext-eats-items-in-call-args

sbehnel:

I'm seeing a crash in the cythonarray test in Cython's test suite with PyPy 
5.0.1. To reproduce, get latest Cython master from github and run

CFLAGS="-O0 -ggdb" gdb --args pypy runtests.py -vv --backend=c --debug 
cythonarray

The backtrace that I get is:

#0  __pyx_memoryview___cinit__ (__pyx_v_self=0xf78eb0, __pyx_args=0xf78e80, 
__pyx_kwds=0xb3f000) at cythonarray.c:7081
#1  0x00007fffefe721af in __pyx_tp_new_memoryview (t=0x7ffff00873a0 
<__pyx_type___pyx_memoryview>, a=0xf78e80, k=0xb3f000) at cythonarray.c:18402
#2  0x00007ffff5e2faf8 in ?? () from 
/home/stefan/ablage/software/Python/pypy-5.0.1-linux64/bin/libpypy-c.so
[more PyPy]
#17 0x00007ffff525b015 in ?? () from 
/home/stefan/ablage/software/Python/pypy-5.0.1-linux64/bin/libpypy-c.so
#18 0x00007ffff51f8d2d in PyPyObject_Call () from 
/home/stefan/ablage/software/Python/pypy-5.0.1-linux64/bin/libpypy-c.so
#19 0x00007fffefe5eeae in __pyx_array_get_memview (__pyx_v_self=0x17d8060) at 
cythonarray.c:6413

When I print the items in the args tuple of the call (which gets passed into 
PyPyObject_Call() above), it looks ok. The callee, however, receives a 
different tuple pointer and all 3 items in that tuple are NULL. The original 
tuple still contains the correct items.

(gdb) p PyPyTuple_Size(0x3939310)       # <- args tuple passed by caller
$17 = 3
(gdb) p PyPyTuple_Size( 0xf78e80)         # <- args tuple received by callee
$18 = 3
(gdb) p PyPyTuple_GetItem(0x3939310, 0)
$19 = 25002080
(gdb) p PyPyTuple_GetItem( 0xf78e80, 0)
$20 = 0



_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to