[New-bugs-announce] [issue32343] Leak Sanitizer reports memory leaks while building using ASAN

Kirit Sankar Gupta report at bugs.python.org
Fri Dec 15 23:48:19 EST 2017


New submission from Kirit Sankar Gupta <kirit1193 at gmail.com>:

./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
        echo "generate-posix-vars failed" ; \
        rm -f ./pybuilddir.txt ; \
        exit 1 ; \
fi

=================================================================
==12061==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 287665 byte(s) in 116 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x6462c7 in PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:616:12

Direct leak of 5096 byte(s) in 9 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x6462c7 in PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:616:12
    #4 0x9786dd in _PyObject_GC_Malloc /home/ksg/cpython/Modules/gcmodule.c:1713:12
    #5 0x9786dd in _PyObject_GC_NewVar /home/ksg/cpython/Modules/gcmodule.c:1742

Direct leak of 2746 byte(s) in 3 object(s) allocated from:
    #0 0x4efdd5 in realloc (/home/ksg/cpython/python+0x4efdd5)
    #1 0x641828 in PyMem_RawRealloc /home/ksg/cpython/Objects/obmalloc.c:521:12
    #2 0x641828 in _PyObject_Realloc /home/ksg/cpython/Objects/obmalloc.c:1905
    #3 0x6463fd in PyObject_Realloc /home/ksg/cpython/Objects/obmalloc.c:634:12

Direct leak of 591 byte(s) in 1 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x6462c7 in PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:616:12
    #4 0x8dace5 in r_object /home/ksg/cpython/Python/marshal.c:1392:20
    #5 0x8d8780 in r_object /home/ksg/cpython/Python/marshal.c:1224:18
    #6 0x8dad1c in r_object /home/ksg/cpython/Python/marshal.c:1395:22
    #7 0x8d8780 in r_object /home/ksg/cpython/Python/marshal.c:1224:18
    #8 0x8dad1c in r_object /home/ksg/cpython/Python/marshal.c:1395:22
    #9 0x8d3e1d in PyMarshal_ReadObjectFromString /home/ksg/cpython/Python/marshal.c:1598:14
    #10 0x8bffa6 in get_frozen_object /home/ksg/cpython/Python/import.c:1258:12
    #11 0x8bffa6 in _imp_get_frozen_object_impl /home/ksg/cpython/Python/import.c:2018
    #12 0x8bffa6 in _imp_get_frozen_object /home/ksg/cpython/Python/clinic/import.c.h:176
    #13 0x568e15 in _PyMethodDef_RawFastCallDict /home/ksg/cpython/Objects/call.c:497:18
    #14 0x56772b in _PyCFunction_FastCallDict /home/ksg/cpython/Objects/call.c:582:14
    #15 0x56772b in PyCFunction_Call /home/ksg/cpython/Objects/call.c:787

Direct leak of 560 byte(s) in 1 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x641900 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x641900 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x641900 in pymalloc_realloc /home/ksg/cpython/Objects/obmalloc.c:1882
    #4 0x641900 in _PyObject_Realloc /home/ksg/cpython/Objects/obmalloc.c:1901
    #5 0x6463fd in PyObject_Realloc /home/ksg/cpython/Objects/obmalloc.c:634:12

Direct leak of 2 byte(s) in 2 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x645e07 in PyMem_Malloc /home/ksg/cpython/Objects/obmalloc.c:536:12

Indirect leak of 28768 byte(s) in 31 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x6462c7 in PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:616:12
    #4 0x67ab2a in PyType_GenericAlloc /home/ksg/cpython/Objects/typeobject.c:969:15

Indirect leak of 8028 byte(s) in 8 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x6462c7 in PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:616:12

Indirect leak of 2571 byte(s) in 2 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x6462c7 in PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:616:12
    #4 0x68d0b6 in type_call /home/ksg/cpython/Objects/typeobject.c:928:11
    #5 0x569c86 in _PyMethodDef_RawFastCallKeywords /home/ksg/cpython/Objects/call.c:656:18

Indirect leak of 2096 byte(s) in 3 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x6411a9 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x6411a9 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x6462c7 in PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:616:12
    #4 0x9786dd in _PyObject_GC_Malloc /home/ksg/cpython/Modules/gcmodule.c:1713:12
    #5 0x9786dd in _PyObject_GC_NewVar /home/ksg/cpython/Modules/gcmodule.c:1742

Indirect leak of 632 byte(s) in 1 object(s) allocated from:
    #0 0x4ef9b0 in malloc (/home/ksg/cpython/python+0x4ef9b0)
    #1 0x641900 in PyMem_RawMalloc /home/ksg/cpython/Objects/obmalloc.c:503:12
    #2 0x641900 in _PyObject_Malloc /home/ksg/cpython/Objects/obmalloc.c:1560
    #3 0x641900 in pymalloc_realloc /home/ksg/cpython/Objects/obmalloc.c:1882
    #4 0x641900 in _PyObject_Realloc /home/ksg/cpython/Objects/obmalloc.c:1901
    #5 0x6463fd in PyObject_Realloc /home/ksg/cpython/Objects/obmalloc.c:634:12

SUMMARY: AddressSanitizer: 338755 byte(s) leaked in 177 allocation(s).
generate-posix-vars failed
Makefile:589: recipe for target 'pybuilddir.txt' failed
make: *** [pybuilddir.txt] Error 1

----------
components: Build
messages: 308452
nosy: kirit1193
priority: normal
severity: normal
status: open
title: Leak Sanitizer reports memory leaks while building using ASAN
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32343>
_______________________________________


More information about the New-bugs-announce mailing list