[issue27831] Python 3.4.5 leaks memory when attempting to load non-existent file

geeknik report at bugs.python.org
Tue Aug 23 13:57:47 EDT 2016


geeknik added the comment:

Interesting that only Python exhibits this "leaky" behavior that generates a LeakSanitizer error. I don't see similar behavior in Perl, Ruby or PHP. Running a non-ASAN build under Valgrind reports that a leak is still occurring: 

LEAK SUMMARY:
==15496==    definitely lost: 0 bytes in 0 blocks
==15496==    indirectly lost: 0 bytes in 0 blocks
==15496==      possibly lost: 19,784 bytes in 34 blocks
==15496==    still reachable: 879,399 bytes in 862 blocks
==15496==         suppressed: 0 bytes in 0 blocks
==15496==
==15496== ERROR SUMMARY: 98 errors from 40 contexts (suppressed: 0 from 0)

>From the Valgrind manual:
"possibly lost" means your program is leaking memory, unless you're doing unusual things with pointers that could cause them to point into the middle of an allocated block;

----------

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


More information about the Python-bugs-list mailing list