Comment 4 for bug 1512622

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Oh, I'm sorry, I got terribly confused!

Upstream Python ships a Valgrind suppressions file that requires you to do one of two things:

- use a debugging build of Python, or
- uncomment the suppressions for PyObject_Free and PyObject_Realloc.

/usr/lib/valgrind/python.supp on wily has this bit

    # Debian note:
    # The file Misc/valgrind-python.supp is placed in an modified form into the
    # directory /usr/lib/valgrind as python.supp. There's no need to to add it
    # with the --suppressions option.
    # The unmodified file is found in /usr/share/doc/python2.6/
    #
    # The python2.6-dbg build has been compiled with -DPy_USING_MEMORY_DEBUGGER
    # so you can safely comment out the suppressions for PyObject_Free and
    # PyObject_Realloc.

I saw the "modified" bit and the "you can safely comment out", and I mistakenly assumed that it had the PyObject_Free and PyObject_Realloc suppressions uncommented already. Because "Comment out" means the opposite of "uncomment", right? And "you can" means it hasn't been done already? Anyway, sorry for jumping to conclusions :(

I'm now looking at a diff with upstream's valgrind-python.supp, and the only diffs are in .so version numbers.

I guess this leaves just the fact that /usr/lib/valgrind/python.supp, as shipped by python-defaults, doesn't have all the required PyObject_Free/PyObject_Realloc suppressions, so even if you uncomment the ones that are there, you'll still see false positives.

It's in fact also a problem with upstream Python 2.7, because the commented-out 64-bit suppressions were only added to, uh, the 'default' branch, which was already 3.something in 2011.

Now that the confusion is out of the way,

> Please could you point out what you would expect to be different from the 32bit version? The referenced commit doesn't change anything for 64bit, and the changes are already in the python-defaults package.

I used "64-bit" to refer to the usage of Addr8/Value8 in the newly-added commented-out PyObject_{Free/Realloc} suppressions, because the existing commetned-out suppressions use Addr4/Value4, which are only used on 32-bit systems. To be more precise, I'm attaching a patch of what I think needs to be done -- ideally in Debian first (or even upstream; I asked for a 2.7 backport in http://bugs.python.org/issue12612).