Re: [Valgrind-users] Memcheck not behave as expected : Overlapping src and dst pointers in memcpy

2011-04-12 Thread David Chapman
On 4/12/2011 8:24 AM, Wan Mohd Fairuz Wan Ismail wrote: Hi, I did a simple code to test out Overlapping |src| and |dst| pointers in |memcpy |using memcheck. But it seems memcheck don't detect the src and dst addresses are identical. Any idea? CODE: char* arr = malloc(10); memcpy(arr, arr,

Re: [Valgrind-users] Memcheck not behave as expected : Overlapping src and dst pointers in memcpy

2011-04-12 Thread Dave Goodell
On Apr 12, 2011, at 11:18 AM CDT, David Chapman wrote: On 4/12/2011 8:24 AM, Wan Mohd Fairuz Wan Ismail wrote: Hi, I did a simple code to test out Overlapping src and dst pointers in memcpy using memcheck. But it seems memcheck don't detect the src and dst addresses are identical. Any

Re: [Valgrind-users] Memcheck not behave as expected : Overlapping src and dst pointers in memcpy

2011-04-12 Thread WAROQUIERS Philippe
(David: memcpy does not do an overlap check, but Valgrind is there to do these missing checks :). I confirm that the memcpy overlap error is not reported anymore by Valgrind : I have tried at work with a 3.7.0 SVN, and it looks like the memcpy overlap check is broken. Investigating a little bit,