mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
Fixed bug in DRD's realloc() wrapper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10282
This commit is contained in:
parent
a4a24f0c4f
commit
b4443ebc0a
@ -318,7 +318,7 @@ void drd_stop_using_mem(const Addr a1, const SizeT len,
|
||||
{
|
||||
const Addr a2 = a1 + len;
|
||||
|
||||
tl_assert(a1 < a2);
|
||||
tl_assert(a1 <= a2);
|
||||
|
||||
if (UNLIKELY(DRD_(any_address_is_traced)()))
|
||||
{
|
||||
|
||||
@ -198,7 +198,7 @@ static void* DRD_(realloc)(ThreadId tid, void* p_old, SizeT new_size)
|
||||
else if (old_size > new_size)
|
||||
{
|
||||
/* new size is smaller */
|
||||
s_stop_using_mem_callback(mc->data + new_size, old_size);
|
||||
s_stop_using_mem_callback(mc->data + new_size, old_size - new_size);
|
||||
mc->size = new_size;
|
||||
mc->where = VG_(record_ExeContext)(tid, 0);
|
||||
p_new = p_old;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user