[Python-Dev] valgrind and python?

Neal Norwitz neal@metaslash.com
Tue, 27 Aug 2002 19:17:59 -0400

Marcelo Matus wrote:
> Did somebody already test python 2.2.1 using valgrind 1.0.1?

I have used valgrind on python, but mostly the latest CVS version,
not 2.2.1.  valgrind and python were built with gcc 2.96 (redhat 7.2).
I also use purify from time to time when it works (pretty rare).

> because testing one of my own modules, I get the following
> recurrent error report whenever I import something:
> ==19951== Conditional jump or move depends on uninitialised value(s)
> ==19951==    at 0x8094B85: find_module (in
> /home/mmatus/oss2/gcc3/bin/python)
> ==19951==    by 0x8095DE2: import_submodule (Python/import.c:1887)
> ==19951==    by 0x80959B8: load_next (Python/import.c:1752)
> ==19951==    by 0x8097608: import_module_ex (Python/import.c:1603)
> and  I don't know if I can ignore it or if this is a real python error.

Unlikely a python problem.  I just tried valgrind with the current
CVS version of 2.2.1+ (what will eventually become 2.2.2).
There were no problems reported doing import math.

You can try several things to fix the warning:
 * run without your module
 * use a different compiler (version)
 * run the CVS version: cvs upd -r release22-maint
 * pass --workaround-gcc296-bugs=yes option to valgrind