I ran valgrind on distcc and found the following leaks: $ valgrind --leak-check=yes /home/joshh/sandbox/distcc-2.14/distcc gcc -c test.c ==3178== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. ==3178== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. ==3178== Using valgrind-2.0.0, a program supervision framework for x86-linux. ==3178== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. ==3178== Estimated CPU clock rate is 2831 MHz ==3178== For more details, rerun with: -v ==3178== ==3178== discard syms in /lib/libnss_files-2.3.2.so due to munmap() ==3178== discard syms in /lib/libnss_dns-2.3.2.so due to munmap() ==3178== discard syms in /lib/libresolv-2.3.2.so due to munmap() ==3178== ==3178== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 1) ==3178== malloc/free: in use at exit: 5628 bytes in 154 blocks. ==3178== malloc/free: 352 allocs, 198 frees, 25963 bytes allocated. ==3178== For counts of detected errors, rerun with: -v ==3178== searching for pointers to 154 not-freed blocks. ==3178== checked 3956412 bytes. ==3178== ==3178== 24 bytes in 1 blocks are definitely lost in loss record 4 of 11 ==3178== at 0x400296B2: malloc (vg_replace_malloc.c:153) ==3178== by 0x804B7EF: dcc_strip_local_args (strip.c:69) ==3178== by 0x804A11A: dcc_build_somewhere (compile.c:154) ==3178== by 0x804A1A9: dcc_build_somewhere_timed (compile.c:208) ==3178== ==3178== ==3178== 24 bytes in 1 blocks are definitely lost in loss record 5 of 11 ==3178== at 0x400296B2: malloc (vg_replace_malloc.c:153) ==3178== by 0x804BBD0: dcc_strip_dasho (strip.c:149) ==3178== by 0x804A2B1: dcc_cpp_maybe (cpp.c:97) ==3178== by 0x804A08B: dcc_build_somewhere (compile.c:151) ==3178== ==3178== ==3178== 24 bytes in 1 blocks are definitely lost in loss record 6 of 11 ==3178== at 0x400296B2: malloc (vg_replace_malloc.c:153) ==3178== by 0x804C930: dcc_shallowcopy_argv (argutil.c:84) ==3178== by 0x804C174: dcc_scan_args (arg.c:134) ==3178== by 0x804A02B: dcc_build_somewhere (compile.c:131) ==3178== ==3178== ==3178== 40 bytes in 1 blocks are definitely lost in loss record 7 of 11 ==3178== at 0x40029B2A: calloc (vg_replace_malloc.c:284) ==3178== by 0x804AA35: dcc_parse_hosts (hosts.c:402) ==3178== by 0x804ADD2: dcc_parse_hosts_file (hostfile.c:63) ==3178== by 0x804A590: dcc_get_hostlist (hosts.c:161) ==3178== ==3178== LEAK SUMMARY: ==3178== definitely lost: 112 bytes in 4 blocks. ==3178== possibly lost: 0 bytes in 0 blocks. ==3178== still reachable: 5516 bytes in 150 blocks. ==3178== suppressed: 0 bytes in 0 blocks. ==3178== Reachable blocks (those to which a pointer was found) are not shown. ==3178== To see them, rerun with: --show-reachable=yes ==3178==
I am willing to fix these if any one cares. -- Josh __ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/distcc