From: | Shachar Shemesh <psql(at)shemesh(dot)biz> |
---|---|
To: | "Min Xu (Hsu)" <xu(at)cs(dot)wisc(dot)edu> |
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 17:05:10 |
Message-ID: | 4087FB46.9060508@shemesh.biz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Min Xu (Hsu) wrote:
>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
>
>
If I understand correctly, a data is defined to be "used" when anything
other than copying is done on it. Arithmetic operations, branches, etc.
will trigger the error. If you copy the data by adding and then
subtracting a constant from it, valgrind will complain. If all you do
(as in your example) is copy it around, and then copy it some more, it
will not.
Yes, it does keep "uninitialized" bits over your registers. Brrr.
Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting
http://www.lingnu.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Shachar Shemesh | 2004-04-22 17:09:27 | Re: License question |
Previous Message | pgsql | 2004-04-22 17:00:04 | Re: contrib vs. gborg/pgfoundry for replication solutions |