[Python-Dev] ref leaks

Stefan Krah stefan at bytereef.org
Thu Apr 24 17:17:41 CEST 2014


Ethan Furman <ethan at stoneleaf.us> wrote:
> >>Any words of wisdom for tracking those leaks?

Often the easiest way is to compile --with-valgrind and run the test
under Valgrind (obviously).

In the Valgrind output, search for "definitely lost" and ignore the rest.


If that does not turn up anything, consider a bug in regrtest.py:

It happens that certain caches are initialized incrementally in each
repetition of the test, so the reported leaks are spurious. That is
why some caches like small integers are "warmed up" in regrtest.py.

Perhaps there is some recently added cache that needs attention.


Stefan Krah




More information about the Python-Dev mailing list