valgrind questions

David Relson relson at osagesoftware.com
Sat Jan 11 22:41:40 CET 2003


Greetings,

I have a copies of bogofilter, bogoutil, and bogolexer that include a 
statically linked copy of db3.3 (built by me).  Running valgrind with these 
executables gives much more informative results than using than the 
standard shared library.

Is anybody an expert with this tool and interpreting/using its outputs?

The output Here's some of what I've seen/learned.

For example, in bogoutil, dump_file() is calling printf() is callling 
strnlen() and therein lies an issue.  Here's the valgrind output for it

==11753== Invalid read of size 1
==11753==    at 0x402CBCCE: (within /lib/i686/libc-2.2.5.so)
==11753==    by 0x402A6342: (within /lib/i686/libc-2.2.5.so)
==11753==    by 0x804DD6A: dump_file (in /home/relson/filter/tst/bogoutil)
==11753==    by 0x804F023: main (in /home/relson/filter/tst/bogoutil)

Valgrind also prints the following message sets, which I don't understand 
(yet):

==11753==    by 0x4026F082: (within /lib/i686/libc-2.2.5.so)
==11753==    by 0x804DA71: strcpy@@GLIBC_2.0 (in 
/home/relson/filter/tst/bogoutil)

==11753==    Address 0x42C056FF is 0 bytes after a block of size 15 alloc'd
==11753==    at 0x4003BB2C: realloc (in /usr/lib/valgrind/valgrind.so)
==11753==    by 0x806DEA0: __os_realloc (in /home/relson/filter/tst/bogoutil)
==11753==    by 0x809DAB2: __db_retcopy (in /home/relson/filter/tst/bogoutil)
==11753==    by 0x809D925: __db_ret (in /home/relson/filter/tst/bogoutil)
==11753==    by 0x8092283: __db_c_get (in /home/relson/filter/tst/bogoutil)
==11753==    by 0x804DC25: dump_file (in /home/relson/filter/tst/bogoutil)
==11753==    by 0x804F023: main (in /home/relson/filter/tst/bogoutil)
==11753==    by 0x4026F082: (within /lib/i686/libc-2.2.5.so)
==11753==    by 0x804DA71: strcpy@@GLIBC_2.0 (in 
/home/relson/filter/tst/bogoutil)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind.grftest.0111.1544.tgz
Type: application/x-compressed
Size: 3596 bytes
Desc: not available
URL: <https://www.bogofilter.org/pipermail/bogofilter-dev/attachments/20030111/a35a642d/attachment.bin>
-------------- next part --------------
--------------------------------------------------------
David Relson                   Osage Software Systems, Inc.
relson at osagesoftware.com       Ann Arbor, MI 48103
www.osagesoftware.com          tel:  734.821.8800



More information about the bogofilter-dev mailing list