|
From: Bgs <bg...@bg...> - 2007-01-15 10:49:04
|
Greetings, I used valgrind before, but never had this problem. Probably a simple prob, but I can't spot it. I don't get the source file and line number infos when running valgrin. Here is the output of the compile and run: root@web22:~/src/apachemysqllog# make gcc -c -O0 -g -o apachemysqllog.o apachemysqllog.c gcc -c -O0 -g -o parse.o parse.c gcc -c -O0 -g -o io.o io.c gcc -c -O0 -g -o debug.o debug.c gcc -g -o apachemysqllog apachemysqllog.o parse.o io.o debug.o -lmysqlclient root@wh-web01:~/src/apachemysqllog# valgrind --leak-check=yes apachemysqllog ==5007== Memcheck, a memory error detector. ==5007== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==5007== Using LibVEX rev 1658, a library for dynamic binary translation. ==5007== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==5007== Using valgrind-3.2.1, a dynamic binary instrumentation framework. ==5007== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==5007== For more details, rerun with: -v ==5007== --5007-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --5007-- DWARF2 CFI reader: unhandled CFI instruction 0:50 ==5007== Conditional jump or move depends on uninitialised value(s) ==5007== at 0x401E6A5: strlen (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==5007== by 0x8048C10: (within /usr/local/bin/apachemysqllog) ==5007== by 0x417DE13: (below main) (in /lib/tls/libc-2.3.6.so) ==5007== ==5007== Conditional jump or move depends on uninitialised value(s) ==5007== at 0x8049F45: (within /usr/local/bin/apachemysqllog) ==5007== by 0x8048D5A: (within /usr/local/bin/apachemysqllog) ==5007== by 0x417DE13: (below main) (in /lib/tls/libc-2.3.6.so) ==5007== ==5007== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 29 from 2) ==5007== malloc/free: in use at exit: 65,788 bytes in 19 blocks. ==5007== malloc/free: 61 allocs, 42 frees, 87,510 bytes allocated. ==5007== For counts of detected errors, rerun with: -v ==5007== searching for pointers to 19 not-freed blocks. ==5007== checked 1,525,200 bytes. ==5007== ==5007== LEAK SUMMARY: ==5007== definitely lost: 0 bytes in 0 blocks. ==5007== possibly lost: 0 bytes in 0 blocks. ==5007== still reachable: 65,788 bytes in 19 blocks. ==5007== suppressed: 0 bytes in 0 blocks. ==5007== Reachable blocks (those to which a pointer was found) are not shown. ==5007== To see them, rerun with: --show-reachable=yes What am I doing wrong? Thanks Bgs |