On Thu, Jun 14, 2012 at 1:10 PM, Kevyn-Alexandre Paré
<[email protected]> wrote:
>
> valgrind --leak-check=full --partial-loads-ok=yes ./test
>
> Adding the flag didn't  remove the error?

Are you _sure_ it is exactly the same error?  Your original report
said this was the error:

==21719== Invalid read of size 4
==21719==    at 0x4004F0: main (in /home/kapare/Documents/test)
==21719==  Address 0x51d0044 is 4 bytes inside a block of size 6 alloc'd

For an aligned read of size 4 that is 4 bytes into a block of size 6,
--partial-loads-ok=yes should definitely silence the error message.
But if this is really a SSE load, it will now complain about an
invalid read of size 8 because partial-loads-ok has not been
implemented for 8-byte loads
(https://bugs.kde.org/show_bug.cgi?id=294285).

Please re-read the error message carefully and confirm?  And if that
is the problem, consider voting for bug 294285.

 - Pat

P.S.  In my opinion, partial-loads-ok=yes should be the default, since
it correctly models how real machines behave.  (Valgrind is a machine
simulator, not a C interpreter...  And an aligned access can never
"partially fault".)  This would also be a totally general fix instead
of intercepting more and more library calls.  But it needs to be fixed
for SSE and AVX loads first, and I just have not had the time...

P.P.S.  --partial-loads-ok=yes used to create false negatives
(https://bugs.kde.org/show_bug.cgi?id=294523), but that is fixed.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to