[issue31311] SystemError raised by PyCData_setstate() in case __dict__ is not a dict
Serhiy Storchaka
report at bugs.python.org
Wed Aug 30 16:58:44 EDT 2017
Serhiy Storchaka added the comment:
And the following example results in segmentation fault.
import ctypes
class BadStruct(ctypes.Structure):
@property
def __dict__(self):
raise AttributeError
BadStruct().__setstate__({}, b'')
As for change the format given to PyArg_ParseTuple(), I think it can be done only in master. It is better to make a separate PR for this.
----------
nosy: +serhiy.storchaka
type: behavior -> crash
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31311>
_______________________________________
More information about the Python-bugs-list
mailing list