Hmm...I think there's a difference in the environment.
For me:About This Mac > More Info... > System Report... > Software > Developer:
Version: 3.2 (10M2518) Location: /Developer Applications:
Xcode: 3.2.6 (1761) Interface Builder: 3.2.6 (851) Instruments:
2.7 (3017) Dashcode: 3.0.2 (333) SDKs: Mac OS X: 10.5: (9L31a)
10.6: (10M2518)
and for you memcpy is redirected differently:> --24112-- REDIR: 0x10015bcbd
(memcpy$VARIANT$sse42) redirected to 0x100010ed0 (memmove$VARIANT$sse42)
In any case... pardon my questions... I'm still a newbie in this.But can you
please explain the discussions between you and Pat? In particular...- Why would
memcpy need to read 8 bytes more?- And why would the warning depend on the
destination? That is, why am I getting this only in the 2nd iteration and not
any other time?
Thanks.- Tan
> Date: Sun, 8 Jul 2012 16:52:57 -0700
> From: [email protected]
> To: [email protected]
> Subject: Re: [Valgrind-users] Strange warning for invalid read of size 8 in
> memcpy
>
> > But, I still get the warning even with --partial-loads-ok=yes. Why so?
>
> I cannot reproduce that (in particular, I get no complaint from memcheck)
> with a freshly-built valgrind-3.7.0 in the environment:
> Darwin host.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15
> PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
> About This Mac > More Info... > System Report... > Software > Developer
> 3.2 (10A432) /Developer
> 4.3.2 (4E2002) /Applications/Xcode.app
> ln -s /Developer/SDKs/MacOSX10.6.sdk/usr/include /usr/include
> CC='gcc -L/Developer/SDKs/MacOSX10.6.sdk/usr/lib'
>
> $ valgrind -v ./check ## note no '--partial-loads-ok=yes'
> ==24112== Memcheck, a memory error detector
> ==24112== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
> ==24112== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
> ==24112== Command: ./check
> ==24112==
> --24112-- Valgrind options:
> --24112-- -v
> --24112-- Contents of /proc/version:
> --24112-- can't open /proc/version
> --24112-- Arch and hwcaps: AMD64, amd64-sse3-cx16
> --24112-- Page sizes: currently 4096, max supported 4096
> --24112-- Valgrind library directory: /Users/jreiser/local/lib/valgrind
> --24112-- ./check (0x100000000)
> --24112-- reading syms from primary file (7 20)
> --24112-- dSYM directory is missing; consider using --dsymutil=yes
> --24112-- /usr/lib/dyld (0x7fff5fc00000)
> --24112-- reading syms from primary file (6 1179)
> --24112-- Reading suppressions file:
> /Users/jreiser/local/lib/valgrind/default.supp
> ==24112== embedded gdbserver: reading from
> /var/folders/0y/vg59c4zd2p593j05mr_dcqch0000gn/T//vgdb-pipe-from-vgdb-to-24112-by-jreiser-on-???
> ==24112== embedded gdbserver: writing to
> /var/folders/0y/vg59c4zd2p593j05mr_dcqch0000gn/T//vgdb-pipe-to-vgdb-from-24112-by-jreiser-on-???
> ==24112== embedded gdbserver: shared mem
> /var/folders/0y/vg59c4zd2p593j05mr_dcqch0000gn/T//vgdb-pipe-shared-mem-vgdb-24112-by-jreiser-on-???
> ==24112==
> ==24112== TO CONTROL THIS PROCESS USING vgdb (which you probably
> ==24112== don't want to do, unless you know exactly what you're doing,
> ==24112== or are doing some strange experiment):
> ==24112== /Users/jreiser/local/lib/valgrind/../../bin/vgdb --pid=24112
> ...command...
> ==24112==
> ==24112== TO DEBUG THIS PROCESS USING GDB: start GDB like this
> ==24112== /path/to/gdb ./check
> ==24112== and then give GDB the following command
> ==24112== target remote | /Users/jreiser/local/lib/valgrind/../../bin/vgdb
> --pid=24112
> ==24112== --pid is optional if only one valgrind process is running
> ==24112==
> --24112-- REDIR: 0x7fff5fc1dfc0 (strcmp) redirected to 0x13804cba0 (???)
> --24112-- REDIR: 0x7fff5fc1b161 (arc4random) redirected to 0x13804cc3e (???)
> --24112-- REDIR: 0x7fff5fc20a50 (strlen) redirected to 0x13804cb6f (???)
> --24112-- REDIR: 0x7fff5fc1c850 (strcpy) redirected to 0x13804cbbc (???)
> --24112-- REDIR: 0x7fff5fc19f17 (strcat) redirected to 0x13804cb80 (???)
> --24112-- /Users/jreiser/local/lib/valgrind/vgpreload_core-amd64-darwin.so
> (0x100004000)
> --24112-- reading syms from primary file (3 135)
> --24112-- dSYM=
> /Users/jreiser/local/lib/valgrind/vgpreload_core-amd64-darwin.so.dSYM/Contents/Resources/DWARF/vgpreload_core-amd64-darwin.so
> --24112-- reading dwarf3 from dsyms file
> --24112--
> /Users/jreiser/local/lib/valgrind/vgpreload_memcheck-amd64-darwin.so
> (0x10000f000)
> --24112-- reading syms from primary file (32 273)
> --24112-- dSYM=
> /Users/jreiser/local/lib/valgrind/vgpreload_memcheck-amd64-darwin.so.dSYM/Contents/Resources/DWARF/vgpreload_memcheck-amd64-darwin.so
> --24112-- reading dwarf3 from dsyms file
> --24112-- /usr/lib/libSystem.B.dylib (0x10001d000)
> --24112-- reading syms from primary file (529 439)
> --24112-- /usr/lib/system/libcache.dylib (0x100058000)
> --24112-- reading syms from primary file (28 32)
> --24112-- /usr/lib/system/libcommonCrypto.dylib (0x100062000)
> --24112-- reading syms from primary file (96 358)
> --24112-- /usr/lib/system/libcompiler_rt.dylib (0x1000b2000)
> --24112-- reading syms from primary file (291 6)
> --24112-- /usr/lib/system/libcopyfile.dylib (0x1000bf000)
> --24112-- reading syms from primary file (7 26)
> --24112-- /usr/lib/system/libdispatch.dylib (0x1000cc000)
> --24112-- reading syms from primary file (114 431)
> --24112-- /usr/lib/system/libdnsinfo.dylib (0x1000eb000)
> --24112-- reading syms from primary file (5 8)
> --24112-- /usr/lib/system/libdyld.dylib (0x1000f0000)
> --24112-- reading syms from primary file (68 92)
> --24112-- /usr/lib/system/libkeymgr.dylib (0x1000fa000)
> --24112-- reading syms from primary file (12 4)
> --24112-- /usr/lib/system/liblaunch.dylib (0x1000fe000)
> --24112-- reading syms from primary file (117 1)
> --24112-- /usr/lib/system/libmacho.dylib (0x10010f000)
> --24112-- reading syms from primary file (86 5)
> --24112-- /usr/lib/system/libquarantine.dylib (0x100121000)
> --24112-- reading syms from primary file (51 7)
> --24112-- /usr/lib/system/libremovefile.dylib (0x100128000)
> --24112-- reading syms from primary file (14 4)
> --24112-- /usr/lib/system/libsystem_blocks.dylib (0x10012e000)
> --24112-- reading syms from primary file (27 27)
> --24112-- /usr/lib/system/libsystem_c.dylib (0x100134000)
> --24112-- reading syms from primary file (1800 1823)
> ==24112== Preferring higher priority redirection:
> --24112-- old: 0x10015bcbd (memcpy$VARIANT$sse42) R-> (2018.0)
> 0x1000111d0 memcpy$VARIANT$sse42
> --24112-- new: 0x10015bcbd (memcpy$VARIANT$sse42) R-> (2018.1)
> 0x100010ed0 memmove$VARIANT$sse42
> ==24112== Preferring higher priority redirection:
> --24112-- old: 0x10015bebd (memcpy$VARIANT$sse3x) R-> (2018.0)
> 0x100011410 memcpy$VARIANT$sse3x
> --24112-- new: 0x10015bebd (memcpy$VARIANT$sse3x) R-> (2018.1)
> 0x100010d10 memmove$VARIANT$sse3x
> --24112-- /usr/lib/system/libsystem_dnssd.dylib (0x100250000)
> --24112-- reading syms from primary file (64 33)
> --24112-- /usr/lib/system/libsystem_info.dylib (0x10025e000)
> --24112-- reading syms from primary file (689 510)
> --24112-- /usr/lib/system/libsystem_kernel.dylib (0x1002af000)
> --24112-- reading syms from primary file (767 72)
> --24112-- /usr/lib/system/libsystem_network.dylib (0x1002df000)
> --24112-- reading syms from primary file (23 100)
> --24112-- /usr/lib/system/libsystem_notify.dylib (0x1002eb000)
> --24112-- reading syms from primary file (115 55)
> --24112-- /usr/lib/system/libsystem_sandbox.dylib (0x1002fb000)
> --24112-- reading syms from primary file (41 7)
> --24112-- /usr/lib/system/libunc.dylib (0x100301000)
> --24112-- reading syms from primary file (30 4)
> --24112-- /usr/lib/system/libunwind.dylib (0x100307000)
> --24112-- reading syms from primary file (102 67)
> --24112-- /usr/lib/system/libxpc.dylib (0x100314000)
> --24112-- reading syms from primary file (523 218)
> --24112-- REDIR: 0x1001d55e0 (memset) redirected to 0x100010c90 (memset)
> --24112-- REDIR: 0x1001d64e0 (strlen) redirected to 0x100010b00 (strlen)
> --24112-- REDIR: 0x1001d5178 (malloc) redirected to 0x100010607 (malloc)
> --24112-- REDIR: 0x1001d512d (calloc) redirected to 0x1000102ff (calloc)
> --24112-- REDIR: 0x10015bcbd (memcpy$VARIANT$sse42) redirected to 0x100010ed0
> (memmove$VARIANT$sse42)
> --24112-- REDIR: 0x1001d5820 (strcmp) redirected to 0x100010c50 (strcmp)
> --24112-- REDIR: 0x1001d63f0 (strncmp) redirected to 0x100010bf0 (strncmp)
> sizeof(mvk_lruc_kv_t)=152, 0x1003462e0, 0x100346378, 0x100346410, 0x1003460d0
> at index 0
> end at index 0
> at index 1
------------------------------------------------------------------------------
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