Changed the behaviour of realloc() in Memcheck, Addrcheck and Helgrind.

Previously, when realloc() was asked to make a block bigger, the ExeContext
describing where that block was allocated was increased;  however, if the block
became smaller or stayed the same size, the original ExeContext remained.  This
is correct in one way (that's where the memory manager actually parcelled out
the block) but it's not very intuitive.  This commit changes things so the
ExeContext of a block is always changed upon realloc().  I added a regression
test for it too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1783 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/tests/realloc3.stderr.exp b/memcheck/tests/realloc3.stderr.exp
new file mode 100644
index 0000000..6704188
--- /dev/null
+++ b/memcheck/tests/realloc3.stderr.exp
@@ -0,0 +1,29 @@
+Invalid read of size 4
+   at 0x........: main (realloc3.c:23)
+   by 0x........: __libc_start_main (...libc...)
+   by 0x........: ...
+   Address 0x........ is 15 bytes after a block of size 5 alloc'd
+   at 0x........: realloc (vg_replace_malloc.c:...)
+   by 0x........: main (realloc3.c:19)
+   by 0x........: __libc_start_main (...libc...)
+   by 0x........: ...
+
+Invalid read of size 4
+   at 0x........: main (realloc3.c:24)
+   by 0x........: __libc_start_main (...libc...)
+   by 0x........: ...
+   Address 0x........ is 15 bytes after a block of size 5 alloc'd
+   at 0x........: realloc (vg_replace_malloc.c:...)
+   by 0x........: main (realloc3.c:20)
+   by 0x........: __libc_start_main (...libc...)
+   by 0x........: ...
+
+Invalid read of size 4
+   at 0x........: main (realloc3.c:25)
+   by 0x........: __libc_start_main (...libc...)
+   by 0x........: ...
+   Address 0x........ is 15 bytes after a block of size 5 alloc'd
+   at 0x........: realloc (vg_replace_malloc.c:...)
+   by 0x........: main (realloc3.c:21)
+   by 0x........: __libc_start_main (...libc...)
+   by 0x........: ...