This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rkuska
Recipients rkuska, vstinner
Date 2015-03-25.09:15:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427274911.3.0.293621781585.issue23769@psf.upfronthosting.co.za>
In-reply-to
Content
I tried leak2.py with valgrind, I've uncommented the lines you mentioned.

> $ valgrind python3 leak2.py                                                                                                                                                                   
==28421== Memcheck, a memory error detector
==28421== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==28421== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==28421== Command: python3 leak2.py
==28421== 
==28421== 
==28421== HEAP SUMMARY:
==28421==     in use at exit: 1,599,354 bytes in 11,594 blocks
==28421==   total heap usage: 284,971 allocs, 273,377 frees, 37,976,898 bytes allocated
==28421== 
==28421== LEAK SUMMARY:
==28421==    definitely lost: 0 bytes in 0 blocks
==28421==    indirectly lost: 0 bytes in 0 blocks
==28421==      possibly lost: 597,482 bytes in 2,319 blocks
==28421==    still reachable: 1,001,872 bytes in 9,275 blocks
==28421==         suppressed: 0 bytes in 0 blocks
==28421== Rerun with --leak-check=full to see details of leaked memory
==28421== 
==28421== For counts of detected and suppressed errors, rerun with: -v
==28421== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

I've removed `import readline` from leak2.py, everything else left as in previous run (also ofc removed tracemalloc).

> $ valgrind python3 leak3.py                                                                                                                                                                  
==28515== Memcheck, a memory error detector
==28515== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==28515== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==28515== Command: python3 leak2.py
==28515== 
==28515== 
==28515== HEAP SUMMARY:
==28515==     in use at exit: 1,599,384 bytes in 11,595 blocks
==28515==   total heap usage: 285,648 allocs, 274,053 frees, 38,126,379 bytes allocated
==28515== 
==28515== LEAK SUMMARY:
==28515==    definitely lost: 30 bytes in 1 blocks
==28515==    indirectly lost: 0 bytes in 0 blocks
==28515==      possibly lost: 597,375 bytes in 2,317 blocks
==28515==    still reachable: 1,001,979 bytes in 9,277 blocks
==28515==         suppressed: 0 bytes in 0 blocks
==28515== Rerun with --leak-check=full to see details of leaked memory
==28515== 
==28515== For counts of detected and suppressed errors, rerun with: -v
==28515== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)


Duh? Why does readline have this effect?
History
Date User Action Args
2015-03-25 09:15:11rkuskasetrecipients: + rkuska, vstinner
2015-03-25 09:15:11rkuskasetmessageid: <1427274911.3.0.293621781585.issue23769@psf.upfronthosting.co.za>
2015-03-25 09:15:11rkuskalinkissue23769 messages
2015-03-25 09:15:11rkuskacreate