Re: valgrind errors - Mailing list pgsql-hackers

From Min Xu (Hsu)
Subject Re: valgrind errors
Date
Msg-id 20040422165049.GC17673@cs.wisc.edu
Whole thread Raw
In response to Re: valgrind errors  (Shachar Shemesh <psql@shemesh.biz>)
List pgsql-hackers
I am also interested in this so I want to make some comments.

On Thu, 22 Apr 2004 Shachar Shemesh wrote :
> Found it:
> http://developer.kde.org/~sewardj/docs-2.0.0/mc_main.html, section 3.3.2
> 
> >It is important to understand that your program can copy around junk 
> >(uninitialised) data to its heart's content. Memcheck observes this 
> >and keeps track of the data, but does not complain. A complaint is 
> >issued only when your program attempts to make use of uninitialised data.

I am confused by how valgrind define "make use" of data? Isn't
"copy" data a type of "make use"? I mean, if valgrind checks if the
data was used as inputs of memcpy(), it is fine. But if user uses
his own memory_copy(), which loads the data into register,
as if the data is going to be used in some useful computation,
and then copy the register value to some other memory location
to finish the copy (yeah, this IS slow), then valgrind is likely
to be confused too. It may think the data is "used".

I guess all I am saying is that valgrind _can_ still make
mistakes about it.

-Min

-- 
We've heard that a million monkeys at a million keyboards could produce
the complete works of Shakespeare; now, thanks to the Internet, we know
that it is not true.                                                     --Robert Wilensky


pgsql-hackers by date:

Previous
From: pgsql@mohawksoft.com
Date:
Subject: Re: contrib vs. gborg/pgfoundry for replication solutions
Next
From: Shachar Shemesh
Date:
Subject: Re: License question