|
From: <sv...@va...> - 2005-04-24 00:04:47
|
Author: sewardj Date: 2005-04-24 01:04:42 +0100 (Sun, 24 Apr 2005) New Revision: 3549 Modified: trunk/NOTES.txt trunk/coregrind/vg_replace_malloc.c Log: Add intercepts for operator new(unsigned long) and operator new[](unsigned long). The 32-bit ones take unsigned int args, not unsigned longs, and so the existing name-set did not capture them. Modified: trunk/NOTES.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/NOTES.txt 2005-04-23 23:26:29 UTC (rev 3548) +++ trunk/NOTES.txt 2005-04-24 00:04:42 UTC (rev 3549) @@ -1,14 +1,20 @@ =20 23 Apr 05 (memcheck-on-amd64 notes) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* If a thread is given an initial stack with address range [lo .. hi], + we need to tell memcheck that the area [lo - VGA_STACK_REDZONE_SIZE + .. hi] is valid, rather than just [lo .. hi] as has been the case on + x86-only systems. However, am not sure where to look for the call + into memcheck that states the new stack area. =20 -If a thread is given an initial stack with address range [lo .. hi], -we need to tell memcheck that the area [lo - VGA_STACK_REDZONE_SIZE -.. hi] is valid, rather than just [lo .. hi] as has been the case on -x86-only systems. However, am not sure where to look for the=20 -call into memcheck that states the new stack area. +* vg_replace_malloc.c: need to create intercepts for + 64-bit versions of + operator new(unsigned, std::nothrow_t const&) + and=20 + operator new[](unsigned, std::nothrow_t const&) =20 =20 + 9 Apr 05 (starting work on memcheck for 32/64-bit and big/little endian) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * get rid of memcheck/mc_asm.h and include/tool_asm.h. I think=20 Modified: trunk/coregrind/vg_replace_malloc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/vg_replace_malloc.c 2005-04-23 23:26:29 UTC (rev 3548= ) +++ trunk/coregrind/vg_replace_malloc.c 2005-04-24 00:04:42 UTC (rev 3549= ) @@ -215,19 +215,27 @@ ALLOC_or_NULL(m_libc_dot_so_dot_6, malloc, malloc); //ALLOC_or_NULL(m_libpgc_dot_so, malloc, malloc); =20 -// operator new(unsigned int), GNU mangling +// operator new(unsigned int), GNU mangling, 32-bit platforms ALLOC_or_BOMB(m_libstc_plus_plus_star, builtin_new, __builtin_new); ALLOC_or_BOMB(m_libc_dot_so_dot_6, builtin_new, __builtin_new); =20 ALLOC_or_BOMB(m_libstc_plus_plus_star, __builtin_new, __builtin_new); ALLOC_or_BOMB(m_libc_dot_so_dot_6, __builtin_new, __builtin_new); =20 +// TODO: these should only exist on 32-bit platforms ALLOC_or_BOMB(m_libstc_plus_plus_star, _Znwj, __builtin_new); ALLOC_or_BOMB(m_libc_dot_so_dot_6, _Znwj, __builtin_new); =20 +// TODO: these should only exist on 64-bit platforms +// operator new(unsigned long), GNU mangling, 64-bit platforms +ALLOC_or_BOMB(m_libstc_plus_plus_star, _Znwm, __builtin_new); +ALLOC_or_BOMB(m_libc_dot_so_dot_6, _Znwm, __builtin_new); + + // operator new(unsigned int), ARM/cfront mangling //ALLOC_or_BOMB(m_libpgc_dot_so, __nw__FUi, __builtin_new); =20 +// TODO: create 64-bit version // operator new(unsigned, std::nothrow_t const&), GNU mangling ALLOC_or_NULL(m_libstc_plus_plus_star, _ZnwjRKSt9nothrow_t, __builtin_n= ew); ALLOC_or_NULL(m_libc_dot_so_dot_6, _ZnwjRKSt9nothrow_t, __builtin_n= ew); @@ -235,9 +243,17 @@ // operator new[](unsigned int), GNU mangling ALLOC_or_BOMB(m_libstc_plus_plus_star, __builtin_vec_new, __builtin_vec_= new ); ALLOC_or_BOMB(m_libc_dot_so_dot_6, __builtin_vec_new, __builtin_vec_= new ); + +// TODO: these should only exist on 32-bit platforms ALLOC_or_BOMB(m_libstc_plus_plus_star, _Znaj, __builtin_vec_= new ); ALLOC_or_BOMB(m_libc_dot_so_dot_6, _Znaj, __builtin_vec_= new ); =20 +// TODO: these should only exist on 64-bit platforms +// operator new[](unsigned long), GNU mangling, 64-bit platforms +ALLOC_or_BOMB(m_libstc_plus_plus_star, _Znam, __builtin_vec_= new ); +ALLOC_or_BOMB(m_libc_dot_so_dot_6, _Znam, __builtin_vec_= new ); + +// TODO: create 64-bit version // operator new[](unsigned, std::nothrow_t const&), GNU mangling ALLOC_or_NULL(m_libstc_plus_plus_star, _ZnajRKSt9nothrow_t, __builtin_ve= c_new ); ALLOC_or_NULL(m_libc_dot_so_dot_6, _ZnajRKSt9nothrow_t, __builtin_ve= c_new ); |