Re: valgrind errors

From: "Min Xu (Hsu)" <xu(at)cs(dot)wisc(dot)edu>
To: Shachar Shemesh <psql(at)shemesh(dot)biz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: valgrind errors
Date: 2004-04-22 16:50:50
Message-ID: 20040422165049.GC17673@cs.wisc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-04-22 16:56:46 Re: License question
Previous Message Shachar Shemesh 2004-04-22 16:49:38 Re: License question