|
From: Julian S. <js...@ac...> - 2005-10-17 22:46:24
|
Sure. Nobody is claiming that memcheck gives 100.0% accurate
definedness tracking at all times. It would probably be possible
to introduce extra precision in definedness tracking to cover the
two cases you show. However, that more elaborate instrumentation
is slower, and so will slow down the 99.9% of programs which don't
exhibit these behaviours.
The real issue is, we have to draw a line somewhere between accuracy
of definedness tracking and the performance overhead. Where do you
want that line to be? What we have concentrated on is to make it
reasonably accurate for most run-of-the-mill integer code, and from
the feedback we get I think we do pretty well on the whole.
That said .. if the cases you show are real problems in real code,
and not just example test cases, then I am interested in investigating
further.
J
On Monday 17 October 2005 20:42, Scott Long wrote:
> Valgrind 3.0.1 erroneously reports an error ("Conditional jump or move
> depends on uninitialised value(s)") on the if-statements of both of the
> following code snippets (compiled with GCC 3.2.3, no optimization):
>
> int main()
> {
> int uninit;
> int two = 2;
>
> uninit *= two;
> if(!(uninit & 1)) // there should be no error here
> {
> printf("Hello, world!\n");
> }
> return 0;
> }
>
> -----
>
> int main()
> {
> int uninit;
>
> uninit ^= 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
|