Message257724
| Author |
barry |
| Recipients |
Arfrever, alexandre.vassalotti, barry, josh.r, kitterma, nadeem.vawda, pitrou, python-dev, serhiy.storchaka |
| Date |
2016年01月07日.22:47:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1452206838.04.0.112789884094.issue22995@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I added some debugging to the if(required) clause. This is interesting:
basicsize 16
slotnames 0 basicsize 16
tp_basicsize 80 basicsize 16
tp_basicsize comes in at 16 bytes. tp_dictoffset and tp_weaklistoffset must both be 0, and while slotnames is not Py_None, it must be adding 0 to the basicsize. Since sizeof(PyObject *) can't be 0, it must mean that Py_SIZE(slotnames) is 0 (since they are multiplied).
But as you can see tp_basicsize is 80. So essentially PyBaseObject_Type.tp_basicsize is 16 but obj->ob_type->tp_basicsize is 80, and that triggers the traceback. |
|