Regarding log messages generated by valgrind

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Regarding log messages generated by valgrind

Arnab Bakshi
Hi All,

    I have some queries regarding the log messages generated by
valgrind when a leak check is performed. I performed a leak-check on
my program with the following options :

   --leak-check=yes --show-reachable=yes.

  The error message depicted that there are some uninitialized
variables, the log generated is as follows :

     ==23922== Use of uninitialised value of size 4
   
     ==23922== Conditional jump or move depends on uninitialised value(s)

   
   My question is, when are this messages logged by valgrind i.e. what
errors in the program (which is under test) are this messages logged ?

  I went through my code and found that everything is fine and the
variables used are initialised properly, so I am wondering what other
possible errors may lead to these type of message.

Any suggestions would be of great help.

Regards
-Arnab


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Regarding log messages generated by valgrind

jeremy (Bugzilla)
Arnab Bakshi wrote:

>Hi All,
>
>    I have some queries regarding the log messages generated by
>valgrind when a leak check is performed. I performed a leak-check on
>my program with the following options :
>
>   --leak-check=yes --show-reachable=yes.
>
>  The error message depicted that there are some uninitialized
>variables, the log generated is as follows :
>
>     ==23922== Use of uninitialised value of size 4
>  
>     ==23922== Conditional jump or move depends on uninitialised value(s)
>
>  
>   My question is, when are this messages logged by valgrind i.e. what
>errors in the program (which is under test) are this messages logged ?
>
>  I went through my code and found that everything is fine and the
>variables used are initialised properly, so I am wondering what other
>possible errors may lead to these type of message.
>
Even if you initialize a variable properly, if you later copy an
undefined value into it, it can produce this message.  You need to look
at the dataflow of your program to see how an undefined value got where
it did.  Including valgrind/memcheck.h and using
VALGRIND_CHECK_DEFINED() will help.

    J



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users