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: Python 3 ships an outdated valgrind suppressison file.
Type: Stage: resolved
Components: Versions: Python 3.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Valgrind suppression file should be updated
View: 24111
Assigned To: Nosy List: christian.heimes, mic-e, ned.deily, vstinner
Priority: normal Keywords:

Created on 2015-05-07 15:30 by mic-e, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg242716 - (view) Author: Michael Ensslin (mic-e) * Date: 2015-05-07 15:30
The suppression file that is shipped in Misc/valgrind-python.supp of the CPython 3(.x) source tarball only works with CPython 2.

This was tested on Debian Sid, with Python 3.4.3 and Python 2.7.9, both presumably not compiled with "--valgrind".

Since Debian does not ship valgrind-python.supp, I downloaded the source tarball for Python 3.4.3, and edited the suppression file (un-commenting the rules for Free and Realloc, as the documentation suggests for when running with a non-valgrind-aware version of CPython).

The test results are as follows:

$ uname -a
Linux mic 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-2 (2015-04-13) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux unstable (sid)
Release:	unstable
Codename:	sid
$ valgrind --version
valgrind-3.10.1
$ python3 --version
Python 3.4.3
$ python2 --version
Python 2.7.9
$ valgrind --tool=memcheck --suppressions=/tmp/Python-3.4.3/Misc/valgrind-python.supp python3 -c 'import sys; print(sys.version)'
(...) ERROR SUMMARY: 666 errors from 61 contexts (suppressed: 0 from 0)
$ valgrind --tool=memcheck --suppressions=/tmp/Python-3.4.3/Misc/valgrind-python.supp python2 -c 'import sys; print(sys.version)'
(...) ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 486 from 28)
msg242717 - (view) Author: Michael Ensslin (mic-e) * Date: 2015-05-07 15:37
Note:

Additionally replacing

PyObject_Free -> _PyObject_Free

and

PyObject_Realloc -> _PyObject_Realloc

appears to fix the issue.
msg242722 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-05-07 18:39
Thanks for the report.  This problem and solution was just reported recently in Issue24111.
History
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68329
2015-05-07 18:39:04ned.deilysetstatus: open -> closed

superseder: Valgrind suppression file should be updated

nosy: + ned.deily
messages: + msg242722
resolution: duplicate
stage: resolved
2015-05-07 15:39:34serhiy.storchakasetnosy: + vstinner, christian.heimes
2015-05-07 15:37:40mic-esetmessages: + msg242717
2015-05-07 15:31:10mic-esettitle: Python 3 ships an outdated valgrind suppresison file. -> Python 3 ships an outdated valgrind suppressison file.
2015-05-07 15:30:10mic-ecreate