From: Nicholas Nethercote Date: Fri, 20 Oct 2006 22:23:54 +0000 (+0000) Subject: Add an FAQ. X-Git-Tag: svn/VALGRIND_3_2_2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cca7b7350328bef5ca7ba5a5cdf30398e55752ef;p=thirdparty%2Fvalgrind.git Add an FAQ. MERGED FROM TRUNK git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6327 --- diff --git a/docs/xml/FAQ.xml b/docs/xml/FAQ.xml index 5128926518..720b647023 100644 --- a/docs/xml/FAQ.xml +++ b/docs/xml/FAQ.xml @@ -517,6 +517,36 @@ int main(void) + + + Memcheck's uninitialised value errors are hard to track down, + because they are often reported some time after they are caused. Could + Memcheck record a trail of operations to better link the cause to the + effect? Or maybe just eagerly report any copies of uninitialised + memory values? + + + We'd love to improve these errors, but we don't know how to do it + without huge performance penalties. + + You can use the client request + VALGRIND_CHECK_VALUE_IS_DEFINED to help + track these errors down -- work backwards from the point where the + uninitialised error occurs, checking suspect values until you find the + cause. This requires editing, compiling and re-running your program + multiple times, which is a pain, but still easier than debugging the + problem without Memcheck's help. + + As for eager reporting of copies of uninitialised memory values, + this has been suggested multiple times. Unfortunately, almost all + programs legitimately copy uninitialise memory values around (because + compilers pad structs to preserve alignment) and eager checking leads to + hundreds of false positives. Therefore Memcheck does not support eager + checking at this time. + + + +