[issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258)

INADA Naoki report at bugs.python.org
Thu Aug 10 03:02:32 EDT 2017


INADA Naoki added the comment:

I think it's false positive of ASAN.

We have dynamically sized block.
https://github.com/python/cpython/blob/3b0f620c1a2a21272a9e2aeca6ca1d1ac10f8162/Objects/dict-common.h#L49-L69

dictobject.c:547 calls memcpy to fill the block and head pointer
is defined as `int8_t [8]`.
ASAN doesn't know this is overallocated memory block.

----------
nosy: +inada.naoki

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31166>
_______________________________________


More information about the Python-bugs-list mailing list