Don't skip the top frame when picking up ExeContexts for malloc etc.

This restores the pre-pthread-merge behaviour.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@78
This commit is contained in:
Julian Seward 2002-04-16 01:10:18 +00:00
parent 495ba4092e
commit 94c1bf2cf4
2 changed files with 6 additions and 6 deletions

View File

@ -230,7 +230,7 @@ static ShadowChunk* client_malloc_shadow ( ThreadState* tst,
p = (Addr)VG_(malloc_aligned)(VG_AR_CLIENT, align, size);
sc = VG_(malloc)(VG_AR_PRIVATE, sizeof(ShadowChunk));
sc->where = VG_(get_ExeContext)(True, tst->m_eip, tst->m_ebp);
sc->where = VG_(get_ExeContext)(False, tst->m_eip, tst->m_ebp);
sc->size = size;
sc->allockind = kind;
sc->data = p;
@ -351,7 +351,7 @@ void VG_(client_free) ( ThreadState* tst, void* ptrV, VgAllocKind kind )
VGM_(make_noaccess) ( sc->data - VG_AR_CLIENT_REDZONE_SZB,
sc->size + 2*VG_AR_CLIENT_REDZONE_SZB );
VGM_(make_noaccess) ( (Addr)sc, sizeof(ShadowChunk) );
sc->where = VG_(get_ExeContext)(True, tst->m_eip, tst->m_ebp);
sc->where = VG_(get_ExeContext)(False, tst->m_eip, tst->m_ebp);
/* Put it out of harm's way for a while. */
add_to_freed_queue ( sc );
@ -387,7 +387,7 @@ void* VG_(client_calloc) ( ThreadState* tst, UInt nmemb, UInt size1 )
size = nmemb * size1;
p = (Addr)VG_(malloc)(VG_AR_CLIENT, size);
sc = VG_(malloc)(VG_AR_PRIVATE, sizeof(ShadowChunk));
sc->where = VG_(get_ExeContext)(True, tst->m_eip, tst->m_ebp);
sc->where = VG_(get_ExeContext)(False, tst->m_eip, tst->m_ebp);
sc->size = size;
sc->allockind = Vg_AllocMalloc; /* its a lie - but true. eat this :) */
sc->data = p;

View File

@ -230,7 +230,7 @@ static ShadowChunk* client_malloc_shadow ( ThreadState* tst,
p = (Addr)VG_(malloc_aligned)(VG_AR_CLIENT, align, size);
sc = VG_(malloc)(VG_AR_PRIVATE, sizeof(ShadowChunk));
sc->where = VG_(get_ExeContext)(True, tst->m_eip, tst->m_ebp);
sc->where = VG_(get_ExeContext)(False, tst->m_eip, tst->m_ebp);
sc->size = size;
sc->allockind = kind;
sc->data = p;
@ -351,7 +351,7 @@ void VG_(client_free) ( ThreadState* tst, void* ptrV, VgAllocKind kind )
VGM_(make_noaccess) ( sc->data - VG_AR_CLIENT_REDZONE_SZB,
sc->size + 2*VG_AR_CLIENT_REDZONE_SZB );
VGM_(make_noaccess) ( (Addr)sc, sizeof(ShadowChunk) );
sc->where = VG_(get_ExeContext)(True, tst->m_eip, tst->m_ebp);
sc->where = VG_(get_ExeContext)(False, tst->m_eip, tst->m_ebp);
/* Put it out of harm's way for a while. */
add_to_freed_queue ( sc );
@ -387,7 +387,7 @@ void* VG_(client_calloc) ( ThreadState* tst, UInt nmemb, UInt size1 )
size = nmemb * size1;
p = (Addr)VG_(malloc)(VG_AR_CLIENT, size);
sc = VG_(malloc)(VG_AR_PRIVATE, sizeof(ShadowChunk));
sc->where = VG_(get_ExeContext)(True, tst->m_eip, tst->m_ebp);
sc->where = VG_(get_ExeContext)(False, tst->m_eip, tst->m_ebp);
sc->size = size;
sc->allockind = Vg_AllocMalloc; /* its a lie - but true. eat this :) */
sc->data = p;