mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
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
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
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........: ...
|