[issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258)
INADA Naoki
report at bugs.python.org
Thu Aug 10 04:27:17 EDT 2017
INADA Naoki added the comment:
As Benjamin commented, this is caused by mutating internal dict.
PyType_Lookup() use "method cache", based on "tp_version_tag" in the type object.
When you modify internal dict directly, namespace is changed without
invalidating tp_version_tag.
So cached pointer is used, and it's already deallocated.
I don't know we should fix it or not.
I don't have any idea fix this without any performance penalty.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31166>
_______________________________________
More information about the Python-bugs-list
mailing list