> I'm getting an invalid read of size 8 warning with the code (check.c) below. > Everything seems to be fine, and the warning about reading beyond the > allocated source pointer comes only when I'm copying the source to a > particular index of the destination. >
Please copy+paste the exact error message and traceback. The pc matters: your program, memcheck's interceptor, or un-intercepted libc instructions. Also, the addresses matter: the low-order 5 bits of each of the source, destination, and length. > My environment: > - MacOSX Darwin 10.8.0 Darwin Kernel Version 10.8.0 > - valgrind-3.7.0 > - gcc version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build > 5666) (dot 3) Thank you for reporting those versions! Also, which version of libc are you using? Re-run with "valgrind -v ./check". Check the suppressions file --1658-- Reading suppressions file: /usr/lib64/valgrind/default.supp to see which mem* reports are being suppressed, and by which version of the suppressions master file(s). Pay particular attention to all REDIR which refer to mem* functions: --1658-- REDIR: 0x363b88e690 (memcpy@@GLIBC_2.14) redirected to 0x4802700 (_vgnU_ifunc_wrapper) --1658-- REDIR: 0x363b944b40 (__memcpy_ssse3_back) redirected to 0x4a09ff0 (memcpy@@GLIBC_2.14) memcheck gives me no complaints when running your check.c on Fedora 17: Linux host.domain 3.4.3-1.fc17.x86_64 #1 SMP Mon Jun 18 19:53:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux Using Valgrind-3.7.0 gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) glibc-2.15-37.fc17.x86_64 -- ------------------------------------------------------------------------------ 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
