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.

classification
Title: Valgrind suppression file
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Aaron Michaux, skrah, terry.reedy
Priority: normal Keywords:

Created on 2017-09-16 20:50 by Aaron Michaux, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
valgrind.log Aaron Michaux, 2017-09-16 20:50
Messages (4)
msg302353 - (view) Author: Aaron Michaux (Aaron Michaux) * Date: 2017-09-16 20:50
The file "Misc/valgrind-python.supp" doesn't work on Linux x64, running Python3.5.2, when configured as such:

  --with-pydebug --with-valgrind --without-pymalloc

Running the interpreter

   echo "x = 1; print(x)" | valgrind --tool=memcheck --leak-check=full --track-origins=yes --verbose --log-file=valgrind.log --suppressions=Misc/valgrind-python.supp /path/to/built/python3

Gives the attached valgrind.log file. The tail of this file says:

==22828== 
==22828== LEAK SUMMARY:
==22828==    definitely lost: 0 bytes in 0 blocks
==22828==    indirectly lost: 0 bytes in 0 blocks
==22828==      possibly lost: 298,529 bytes in 690 blocks
==22828==    still reachable: 605,872 bytes in 4,874 blocks
==22828==         suppressed: 0 bytes in 0 blocks
==22828== Reachable blocks (those to which a pointer was found) are not shown.
==22828== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==22828== 
==22828== ERROR SUMMARY: 256 errors from 256 contexts (suppressed: 0 from 0)
==22828== ERROR SUMMARY: 256 errors from 256 contexts (suppressed: 0 from 0)
msg302759 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-22 18:01
3.5 only gets security fixes, and this does not seem to be a security issue.  Please retest with 3.6 or 3.7.
msg302760 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-09-22 18:08
The suppressions are mainly for "invalid access" due to a gc trick.

The primary goal is to be definitely-lost-clean.


I would say it works as expected.
msg302761 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-09-22 18:12
Also, I don't think --with-pydebug works well with valgrind.

It's either:
   1) --with-pydebug
   2) CFLAGS="-O0 -g" --with-valgrind
   3) CFLAGS="-O0 -g" --without-pymalloc

Combining 2) and 3) probably does not hurt, but is not necessary.
History
Date User Action Args
2022-04-11 14:58:52adminsetgithub: 75675
2017-09-22 18:12:48skrahsetstatus: open -> closed
resolution: not a bug
messages: + msg302761

stage: resolved
2017-09-22 18:08:13skrahsetnosy: + skrah
messages: + msg302760
2017-09-22 18:01:30terry.reedysetnosy: + terry.reedy
messages: + msg302759
2017-09-16 20:50:30Aaron Michauxcreate