|
From: Yeshurun, M. <mei...@in...> - 2005-10-17 20:28:15
|
Actually, according to the definition of that error, Valgrind should
report it here.
You can't expect a memory checker to find mathematical proofs that a
value computed from a set of values that include underfined ones is
deterministic. You can always find more and more complex examples of
this sort of thing.
-----Original Message-----
From: val...@li...
[mailto:val...@li...] On Behalf Of Scott
Long
Sent: Monday, October 17, 2005 9:43 PM
To: val...@li...
Subject: [Valgrind-users] Valgrind erroneously reports uninitialized bit
Valgrind 3.0.1 erroneously reports an error ("Conditional jump or move=20
depends on uninitialised value(s)") on the if-statements of both of the=20
following code snippets (compiled with GCC 3.2.3, no optimization):
int main()
{
int uninit;
int two =3D 2;
uninit *=3D two;
if(!(uninit & 1)) // there should be no error here
{
printf("Hello, world!\n");
}
return 0;
}
-----
int main()
{
int uninit;
uninit ^=3D uninit;
if(!(uninit & 1)) // there should be no error here
{
printf("Hello, world!\n");
}
return 0;
}
Scott
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,
discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|