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.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3549
This commit is contained in:
Julian Seward
2005-04-24 00:04:42 +00:00
parent c97ba2bbaa
commit 78e24d41bd
2 changed files with 28 additions and 6 deletions

View File

@@ -215,19 +215,27 @@ ALLOC_or_NULL(m_libstc_plus_plus_star, malloc, malloc);
ALLOC_or_NULL(m_libc_dot_so_dot_6, malloc, malloc);
//ALLOC_or_NULL(m_libpgc_dot_so, malloc, malloc);
// 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);
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);
// 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);
// 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);
// 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_new);
ALLOC_or_NULL(m_libc_dot_so_dot_6, _ZnwjRKSt9nothrow_t, __builtin_new);
@@ -235,9 +243,17 @@ ALLOC_or_NULL(m_libc_dot_so_dot_6, _ZnwjRKSt9nothrow_t, __builtin_new);
// 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 );
// 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_vec_new );
ALLOC_or_NULL(m_libc_dot_so_dot_6, _ZnajRKSt9nothrow_t, __builtin_vec_new );