This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients Pasha Stetsenko, serhiy.storchaka, xiang.zhang
Date 2018-06-20.11:57:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529495856.09.0.56676864532.issue33742@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think here is a problem. It crashes because you preallocate the type object in a wrong way. You should not just does a malloc and then passes it to the API. In this way, you are able to crash many APIs. For example, malloc a dictobject and then pass it to PyDict_SetItem could highly possibly crash. You should use PyDict_New to allocate the dictobject. Also here, you need to use PyType_GenericAlloc(&PyType_Type, 0) to allocate the type object, not just a malloc.
History
Date User Action Args
2018-06-20 11:57:36xiang.zhangsetrecipients: + xiang.zhang, serhiy.storchaka, Pasha Stetsenko
2018-06-20 11:57:36xiang.zhangsetmessageid: <1529495856.09.0.56676864532.issue33742@psf.upfronthosting.co.za>
2018-06-20 11:57:36xiang.zhanglinkissue33742 messages
2018-06-20 11:57:36xiang.zhangcreate