valgrind questions

David Relson relson at osagesoftware.com
Sun Jan 12 01:53:46 CET 2003


Hi Matthias,

I've noticed that sometimes valgrind includes line numbers and sometimes it 
doesn't.  At one point I modified bogoutil.c with  my favorite "where am I" 
macro:

#define WHAMI fprintf(stdout, "%s:%d\n", __FILE__, __LINE__)

and added several "WHAMI;" statements.

When I did that valgrind included line numbers.  When I took WHAMI out, the 
line numbers disappeared from valgrind's output.  I was using "-g" without 
any "-O" optimizations.  The valgrind behavior was strange.

I also used "--gdb-attach=yes" and used gdb to look at the stack.  That's 
how I found the dump_file(), printf(), strnlen() sequence.

Given that valgrind seems to be identifying problems within the libraries 
we use, i.e. libc and libdb3, there seems to be little for us to fix - 
unless we find it necessary to become db3 or libc contributors :-)

David





More information about the bogofilter-dev mailing list