Hello,
Here's a snippet of valgrind's report.
==1800== Invalid read of size 8
==1800== at 0x5F96FF8: (within /scratch/lib/libapp.so)
==1800== by 0x5BF5744: mapfunc (mapf.c:1321)
==1800== by 0x5BE5894: assembledata (assemd.c:2049)
==1800== by 0x804D391: main (amd.c:444)
==1863== Address 0x64FA7A8 is 0 bytes after a block of size 10,280 alloc'd
==1800== at 0x40046F2: malloc (vg_replace_malloc.c:149)
... ....
The statement at mapf.c:1321 is
memcpy(dst, src, sizeof(shared_buf));
Adding following printf and --trace-malloc=yes
VALGRIND_PRINTF("dst %p src %p size %d\n", dst, src,
sizeof(shared_buf));
The following is seen before the invalid read,
--1863-- malloc(10280)
--1863-- = 0x64F7F80
**1863** dst 0x6505190 src 0x64FA5F8 size 432
The src passed has 432 valid bytes and is not freed before the read.
The code was compiled with intel compiler version "icc (ICC) 9.1 20070512"
using "-debug minimal", flag. The issue does not appear when "-g" debug
flag is used.
I have seen a few cases of false positives when optimized libraries are
used, but this is the first time a false positive has appeared with
-debug minimal.
Is this expected.
Thanks,
Madhan.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users