--- a/wutils.py Mon Jan 18 10:00:46 2010 +0100
+++ b/wutils.py Tue Jan 19 16:56:44 2010 +0100
@@ -121,16 +121,12 @@
raise Utils.WafError("Options --command-template and --valgrind are conflicting")
if not env['VALGRIND']:
raise Utils.WafError("valgrind is not installed")
- argv = [env['VALGRIND'], "--leak-check=full", "--error-exitcode=1"] + argv
+ argv = [env['VALGRIND'], "--leak-check=full", "--show-reachable=yes", "--error-exitcode=1"] + argv
proc = subprocess.Popen(argv, env=proc_env, cwd=cwd, stderr=subprocess.PIPE)
- reg = re.compile ('definitely lost: ([^ ]+) bytes')
error = False
for line in proc.stderr:
sys.stderr.write(line)
- result = reg.search(line)
- if result is None:
- continue
- if result.group(1) != "0":
+ if "== LEAK SUMMARY" in line:
error = True
retval = proc.wait()
if retval == 0 and error: