From: Zachary T. <div...@gm...> - 2009-07-16 16:17:06
|
When I build any program (including an empty main function) using gcc -static I get enormous amounts of errors in valgrind. After some investigation and asking around I think that at least a large portion of them are incorrect. In particular, I get many errors about uninitialized memory and conditional jumps, but when I use --track-origins=yes I find that the memory it's claiming is uninitialized comes from sbrk(). As far as I can tell (please correct me if I'm wrong) this function is guaranteed to return 0-filled memory, so while it's true that the program is not explicitly initializing, it should be initialized anyway. Assuming this assessment is accurate, is it best to deal with this by adding appropriate suppressions to the default suppressions file, or by modifying valgrind to be smarter and know that sbrk memory is always 0-filled? There are a number of other types of errors that seem to be generated quite commonly when using -static, but so far I have not been able to determine if those are harmless. |