Message174152
This rather obscure bug seems to be caused by a failure to properly initialize PyCell_Type.
Running with GDB, we see that _PyType_Lookup(<class 'cell'>, "__dir__")
fails in:
/* Look in tp_dict of types in MRO */
mro = type->tp_mro;
/* If mro is NULL, the type is either not yet initialized
by PyType_Ready(), or already cleared by type_clear().
Either way the safest thing to do is to return NULL. */
if (mro == NULL)
return NULL;
Since:
(gdb) print PyCell_Type->tp_mro
$9 = (PyObject *) 0x0
Searching the code base shows that we never call PyType_Ready(&PyCell_Type).
A patch is attached. |
|
Date |
User |
Action |
Args |
2012-10-29 21:01:32 | bfroehle | set | recipients:
+ bfroehle, Arfrever, christopherthemagnificent, chris.jerdonek, kushal.das |
2012-10-29 21:01:32 | bfroehle | set | messageid: <1351544492.49.0.566969528386.issue16268@psf.upfronthosting.co.za> |
2012-10-29 21:01:32 | bfroehle | link | issue16268 messages |
2012-10-29 21:01:32 | bfroehle | create | |
|