Message320071
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. |
|
Date |
User |
Action |
Args |
2018-06-20 11:57:36 | xiang.zhang | set | recipients:
+ xiang.zhang, serhiy.storchaka, Pasha Stetsenko |
2018-06-20 11:57:36 | xiang.zhang | set | messageid: <1529495856.09.0.56676864532.issue33742@psf.upfronthosting.co.za> |
2018-06-20 11:57:36 | xiang.zhang | link | issue33742 messages |
2018-06-20 11:57:36 | xiang.zhang | create | |
|