python272 <[email protected]> added the comment:
problem also occurs when built with configure option --with-system-ffi
not sure whether it might be a compiler bug or an invalid test?
some debug output:
[@localhost Python-2.7.2]$ gdb ./python
(gdb) run -Wd -3 -E -tt ./Lib/test/regrtest.py -v test_ctypes
...
test_ushort (ctypes.test.test_callbacks.Callbacks) ... ok
test_callback_register_double
(ctypes.test.test_callbacks.SampleCallbacksTestCase) ...
Program received signal SIGSEGV, Segmentation fault.
0x99999998 in ?? ()
(gdb) where
#0 0x99999998 in ?? ()
#1 0x40409718 in _testfunc_cbk_reg_double (a=5.5, b=1.1964487668029418e-47,
c=1.001023, d=0, e=1.5999999999999999e-05, func=0x9999999a)
at /home/Python-2.7.2/Modules/_ctypes/_ctypes_test.c:39
#2 0x41edc9a0 in ffi_call_SYSV () from /usr/lib/libffi.so.5
#3 0x40160000 in slot_tp_iter (self=Cannot access memory at address 0xffffffe0
) at Objects/typeobject.c:5579
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
the referenced file snippets:
/home/Python-2.7.2/Modules/_ctypes/_ctypes_test.c
35 EXPORT(double)
36 _testfunc_cbk_reg_double(double a, double b, double c, double d, double
e,
37 double (*func)(double, double, double, double,
double))
38 {
39 return func(a*a, b*b, c*c, d*d, e*e);
/home/Python-2.7.2/Objects/typeobject.c
5567 static PyObject *
5568 slot_tp_iter(PyObject *self)
5569 {
5570 PyObject *func, *res;
5571 static PyObject *iter_str, *getitem_str;
5572
5573 func = lookup_method(self, "__iter__", &iter_str);
5574 if (func != NULL) {
5575 PyObject *args;
5576 args = res = PyTuple_New(0);
5577 if (args != NULL) {
5578 res = PyObject_Call(func, args, NULL);
5579 Py_DECREF(args);
5580 }
5581 Py_DECREF(func);
5582 return res;
5583 }
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12640>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com