From: Julian Seward Date: Tue, 16 Apr 2002 01:10:18 +0000 (+0000) Subject: Don't skip the top frame when picking up ExeContexts for malloc etc. X-Git-Tag: svn/VALGRIND_1_0_3~368 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94c1bf2cf4f7fe20e10fc15a4c8bcf2bfddad275;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/coregrind/vg_clientmalloc.c b/coregrind/vg_clientmalloc.c index eb450dfe16..132fb50ada 100644 --- a/coregrind/vg_clientmalloc.c +++ b/coregrind/vg_clientmalloc.c @@ -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; diff --git a/vg_clientmalloc.c b/vg_clientmalloc.c index eb450dfe16..132fb50ada 100644 --- a/vg_clientmalloc.c +++ b/vg_clientmalloc.c @@ -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;