From: Tom H. <to...@co...> - 2009-07-16 16:36:57
|
On 16/07/09 17:16, Zachary Turner wrote: > 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. When you statically link a program you prevent valgrind from being able to intercept the malloc and free functions so you will find you get lots of warnings as a result. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |