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 ([email protected])
http://www.compton.nu/

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to