Thanks to @Hasturkun, the issue was with the compiler inlining memcpy()
with a builtin. So, valgrind was not able to hook the memcpy()
and catch the error.
Modified compilation
[sourav@titan temp]$ gcc -g -fno-builtin srvtest.c -o memory
Modified Output
[sourav@titan temp]$ valgrind --leak-check=full ./memory
==19785== Memcheck, a memory error detector
==19785== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==19785== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==19785== Command: ./memory
==19785==
pOne = Sourav Ghosh
pTwo = av Ghosh
==19785== Source and destination overlap in memcpy(0x402602c, 0x4026028, 16)
==19785== at 0x4007AE2: memcpy (mc_replace_strmem.c:482)
==19785== by 0x80484B3: main (srvtest.c:14)
==19785==
pOne = SourSourav Ghosh
pTwo = Sourav Ghosh
==19785==
==19785== HEAP SUMMARY:
==19785== in use at exit: 0 bytes in 0 blocks
==19785== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==19785==
==19785== All heap blocks were freed -- no leaks are possible
==19785==
==19785== For counts of detected and suppressed errors, rerun with: -v
==19785== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 12 from 8)
[sourav@titan temp]$