|
From: Zachary T. <div...@gm...> - 2009-07-14 16:54:04
|
Hello, I'm somewhat a valgrind noob, so apologies if this is a RTFM question. I did search around however and did not see anything definitive about this. I ran valgrind on an app I have and it generated thousands of spurious warnings. I know I can create a .supp file to suppress these, but my question is how do I know which ones are spurious and which ones are not? I found one website that mentioned that there was a .supp file somewhere in the valgrind code repository, but for some reason I cannot access the SVN repository. I'm using the correct SVN url (svn://svn.valgrind.org/valgrind/trunk), shown on the website at (http://www.valgrind.org/downloads/repository.html) but it just says the server timed out or did not respond appropriately. I've never had any problem accessing other svn repositories. Is there a way to tell which warnings are spurious to easily disable them, or is this .supp file which I can't seem to currently access the correct approach? 95% of the errors I get are either "Use of uninitialised value of size 4" (usually in _int_malloc, memcpy, or malloc_consolidate), and "Conditional jump or move depends on uninitialized value" (in anything have to do with static variable initialization / cleanup, etc). A slightly unrelated question is that valgrind doesn't always seem to report source / line number information for C++ STL functions. Is this normal? For example one of my warnings shows this: ==7439== Use of uninitialised value of size 4 ==7439== at 0x827A563: std::string::assign(std::string const&) (in /usr/sbin/snip/bin/snip) ==7439== <snipped> ==7439== <snipped> ==7439== by 0x826D023: std::ostream::flush() (in /usr/sbin/snip/bin/snip) ==7439== <snipped> ==7439== <snipped> ==7439== <snipped> ==7439== by 0x807A332: boost::_mfi::mf1<void, snip, snip*>::operator()(snip*, snip*) const (mem_fn_template.hpp:162) ==7439== by 0x807A4BD: void boost::_bi::list2<boost::_bi::value< snip*>, boost::_bi::value< snip*> >::operator()<boost::_mfi::mf1<void, snip, snip*>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf1<void, snip, snip*>&, boost::_bi::list0&, int) (bind.hpp:306) Here, the entire callstack shows line number information (including the lines I've snipped), except for the two STL calls. Is this normal? I suspect they might be inlined functions, but then again I would expect the boost code at the bottom to be inlined as well, so I don't think that's necessarily the issue. Thanks |