[New-bugs-announce] [issue23769] valgrind reports leaks for test_zipimport

Robert Kuska report at bugs.python.org
Tue Mar 24 23:32:14 CET 2015


New submission from Robert Kuska:

Leaks happen only when both testDoctestFile and testDoctestSuite are run.
Run with Python 3.4.2 and 3.4.1 with same result.

I have extracted those two tests into `leak.py` (attached).

> $ valgrind --suppressions=/../cpython/Misc/valgrind-python.supp python3 leak.py                                                                                            
==17896== Memcheck, a memory error detector
==17896== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==17896== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==17896== Command: python3 leak.py
==17896== 
==17896== 
==17896== HEAP SUMMARY:
==17896==     in use at exit: 1,599,328 bytes in 11,595 blocks
==17896==   total heap usage: 283,757 allocs, 272,162 frees, 37,891,147 bytes allocated
==17896== 
==17896== LEAK SUMMARY:
==17896==    definitely lost: 30 bytes in 1 blocks
==17896==    indirectly lost: 0 bytes in 0 blocks
==17896==      possibly lost: 597,418 bytes in 2,319 blocks
==17896==    still reachable: 1,001,880 bytes in 9,275 blocks
==17896==         suppressed: 0 bytes in 0 blocks
==17896== Rerun with --leak-check=full to see details of leaked memory
==17896== 
==17896== For counts of detected and suppressed errors, rerun with: -v
==17896== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Note that when I remove support.modules_cleanup(*modules_before) from leak.py valgrind reports no leaks (in original test_zipimport those are run in setUp and tearDown).

Output of  
valgrind --suppressions=/home/rkuska/upstream/cpython/Misc/valgrind-python.supp --leak-check=yes -v python3 leak.py
attached as `report`.

----------
components: Tests
files: leak.py
messages: 239193
nosy: rkuska
priority: normal
severity: normal
status: open
title: valgrind reports leaks for test_zipimport
versions: Python 3.4
Added file: http://bugs.python.org/file38672/leak.py

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


More information about the New-bugs-announce mailing list