http://code.google.com/p/valgrind-variant/source/detail?r=123
Modified:
/trunk/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
/trunk/valgrind/memcheck/mc_replace_strmem.c
=======================================
--- /trunk/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c Tue Oct
25 09:11:36 2011
+++ /trunk/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c Fri Nov
18 05:36:56 2011
@@ -289,15 +289,17 @@
#endif
#elif defined(VGO_darwin)
+ // glider: hereafter we uncomment the interceptors for operator new
+ // and operator delete, see https://bugs.kde.org/show_bug.cgi?id=286849
// operator new(unsigned int), GNU mangling
#if VG_WORDSIZE == 4
- //ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwj, __builtin_new);
- //ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znwj, __builtin_new);
+ ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwj, __builtin_new);
+ ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znwj, __builtin_new);
#endif
// operator new(unsigned long), GNU mangling
#if 1 // FIXME: is this right?
- //ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwm, __builtin_new);
- //ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znwm, __builtin_new);
+ ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znwm, __builtin_new);
+ ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znwm, __builtin_new);
#endif
#endif
@@ -319,13 +321,13 @@
#elif defined(VGO_darwin)
// operator new(unsigned, std::nothrow_t const&), GNU mangling
#if VG_WORDSIZE == 4
- //ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwjRKSt9nothrow_t,
__builtin_new);
- //ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnwjRKSt9nothrow_t,
__builtin_new);
+ ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwjRKSt9nothrow_t,
__builtin_new);
+ ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnwjRKSt9nothrow_t,
__builtin_new);
#endif
// operator new(unsigned long, std::nothrow_t const&), GNU mangling
#if 1 // FIXME: is this right?
- //ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwmRKSt9nothrow_t,
__builtin_new);
- //ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnwmRKSt9nothrow_t,
__builtin_new);
+ ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnwmRKSt9nothrow_t,
__builtin_new);
+ ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnwmRKSt9nothrow_t,
__builtin_new);
#endif
#endif
@@ -350,13 +352,13 @@
#elif defined(VGO_darwin)
// operator new[](unsigned int), GNU mangling
#if VG_WORDSIZE == 4
- //ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znaj,
__builtin_vec_new );
- //ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znaj,
__builtin_vec_new );
+ ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znaj,
__builtin_vec_new );
+ ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znaj,
__builtin_vec_new );
#endif
// operator new[](unsigned long), GNU mangling
#if 1 // FIXME: is this right?
- //ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znam,
__builtin_vec_new );
- //ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znam,
__builtin_vec_new );
+ ALLOC_or_BOMB(VG_Z_LIBSTDCXX_SONAME, _Znam,
__builtin_vec_new );
+ ALLOC_or_BOMB(VG_Z_LIBC_SONAME, _Znam,
__builtin_vec_new );
#endif
#endif
@@ -378,13 +380,13 @@
#elif defined(VGO_darwin)
// operator new[](unsigned, std::nothrow_t const&), GNU mangling
#if VG_WORDSIZE == 4
- //ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnajRKSt9nothrow_t,
__builtin_vec_new );
- //ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnajRKSt9nothrow_t,
__builtin_vec_new );
+ ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnajRKSt9nothrow_t,
__builtin_vec_new );
+ ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnajRKSt9nothrow_t,
__builtin_vec_new );
#endif
// operator new[](unsigned long, std::nothrow_t const&), GNU mangling
#if 1 // FIXME: is this right?
- //ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnamRKSt9nothrow_t,
__builtin_vec_new );
- //ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnamRKSt9nothrow_t,
__builtin_vec_new );
+ ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, _ZnamRKSt9nothrow_t,
__builtin_vec_new );
+ ALLOC_or_NULL(VG_Z_LIBC_SONAME, _ZnamRKSt9nothrow_t,
__builtin_vec_new );
#endif
#endif
@@ -456,8 +458,8 @@
#elif defined(VGO_darwin)
// operator delete(void*), GNU mangling
- //FREE(VG_Z_LIBSTDCXX_SONAME, _ZdlPv, __builtin_delete );
- //FREE(VG_Z_LIBC_SONAME, _ZdlPv, __builtin_delete );
+ FREE(VG_Z_LIBSTDCXX_SONAME, _ZdlPv, __builtin_delete );
+ FREE(VG_Z_LIBC_SONAME, _ZdlPv, __builtin_delete );
#endif
@@ -471,8 +473,8 @@
#elif defined(VGO_darwin)
// operator delete(void*, std::nothrow_t const&), GNU mangling
- //FREE(VG_Z_LIBSTDCXX_SONAME, _ZdlPvRKSt9nothrow_t, __builtin_delete );
- //FREE(VG_Z_LIBC_SONAME, _ZdlPvRKSt9nothrow_t, __builtin_delete );
+ FREE(VG_Z_LIBSTDCXX_SONAME, _ZdlPvRKSt9nothrow_t, __builtin_delete );
+ FREE(VG_Z_LIBC_SONAME, _ZdlPvRKSt9nothrow_t, __builtin_delete );
#endif
@@ -489,11 +491,11 @@
#elif defined(VGO_darwin)
// operator delete[](void*), not mangled (for gcc 2.96)
- //FREE(VG_Z_LIBSTDCXX_SONAME, __builtin_vec_delete,
__builtin_vec_delete );
- //FREE(VG_Z_LIBC_SONAME, __builtin_vec_delete,
__builtin_vec_delete );
+ FREE(VG_Z_LIBSTDCXX_SONAME, __builtin_vec_delete, __builtin_vec_delete
);
+ FREE(VG_Z_LIBC_SONAME, __builtin_vec_delete, __builtin_vec_delete
);
// operator delete[](void*), GNU mangling
- //FREE(VG_Z_LIBSTDCXX_SONAME, _ZdaPv, __builtin_vec_delete
);
- //FREE(VG_Z_LIBC_SONAME, _ZdaPv, __builtin_vec_delete
);
+ FREE(VG_Z_LIBSTDCXX_SONAME, _ZdaPv, __builtin_vec_delete );
+ FREE(VG_Z_LIBC_SONAME, _ZdaPv, __builtin_vec_delete );
#endif
@@ -507,8 +509,8 @@
#elif defined(VGO_darwin)
// operator delete[](void*, std::nothrow_t const&), GNU mangling
- //FREE(VG_Z_LIBSTDCXX_SONAME, _ZdaPvRKSt9nothrow_t, __builtin_vec_delete
);
- //FREE(VG_Z_LIBC_SONAME, _ZdaPvRKSt9nothrow_t, __builtin_vec_delete
);
+FREE(VG_Z_LIBSTDCXX_SONAME, _ZdaPvRKSt9nothrow_t, __builtin_vec_delete );
+FREE(VG_Z_LIBC_SONAME, _ZdaPvRKSt9nothrow_t, __builtin_vec_delete );
#endif
@@ -753,7 +755,7 @@
MALLOPT(VG_Z_LIBC_SONAME, mallopt);
#elif defined(VGO_darwin)
- //MALLOPT(VG_Z_LIBC_SONAME, mallopt);
+ MALLOPT(VG_Z_LIBC_SONAME, mallopt);
#endif
=======================================
--- /trunk/valgrind/memcheck/mc_replace_strmem.c Mon Nov 7 02:28:28 2011
+++ /trunk/valgrind/memcheck/mc_replace_strmem.c Fri Nov 18 05:36:56 2011
@@ -180,9 +180,9 @@
#elif defined(VGO_darwin)
//STRRCHR(VG_Z_LIBC_SONAME, strrchr)
- //STRRCHR(VG_Z_LIBC_SONAME, rindex)
- //STRRCHR(VG_Z_DYLD, strrchr)
- //STRRCHR(VG_Z_DYLD, rindex)
+ STRRCHR(VG_Z_LIBC_SONAME, rindex)
+ STRRCHR(VG_Z_DYLD, strrchr)
+ STRRCHR(VG_Z_DYLD, rindex)
STRRCHR(VG_Z_LIBC_SONAME, strrchr)
#endif
@@ -217,9 +217,9 @@
#elif defined(VGO_darwin)
//STRCHR(VG_Z_LIBC_SONAME, strchr)
- //STRCHR(VG_Z_LIBC_SONAME, index)
- //STRCHR(VG_Z_DYLD, strchr)
- //STRCHR(VG_Z_DYLD, index)
+ STRCHR(VG_Z_LIBC_SONAME, index)
+ STRCHR(VG_Z_DYLD, strchr)
+ STRCHR(VG_Z_DYLD, index)
STRCHR(VG_Z_LIBC_SONAME, strchr)
#endif
@@ -255,7 +255,7 @@
STRCAT(VG_Z_LIBC_SONAME, __GI_strcat)
#elif defined(VGO_darwin)
- //STRCAT(VG_Z_LIBC_SONAME, strcat)
+ STRCAT(VG_Z_LIBC_SONAME, strcat)
#endif
@@ -291,8 +291,8 @@
STRNCAT(VG_Z_LIBC_SONAME, strncat)
#elif defined(VGO_darwin)
- //STRNCAT(VG_Z_LIBC_SONAME, strncat)
- //STRNCAT(VG_Z_DYLD, strncat)
+ STRNCAT(VG_Z_LIBC_SONAME, strncat)
+ STRNCAT(VG_Z_DYLD, strncat)
#endif
@@ -339,7 +339,7 @@
#elif defined(VGO_darwin)
//STRLCAT(VG_Z_LIBC_SONAME, strlcat)
- //STRLCAT(VG_Z_DYLD, strlcat)
+ STRLCAT(VG_Z_DYLD, strlcat)
STRLCAT(VG_Z_LIBC_SONAME, strlcat)
#endif
@@ -363,7 +363,7 @@
STRNLEN(VG_Z_LIBC_SONAME, __GI_strnlen)
#elif defined(VGO_darwin)
- //STRNLEN(VG_Z_LIBC_SONAME, strnlen)
+ STRNLEN(VG_Z_LIBC_SONAME, strnlen)
#endif
@@ -431,7 +431,7 @@
#elif defined(VGO_darwin)
//STRCPY(VG_Z_LIBC_SONAME, strcpy)
- //STRCPY(VG_Z_DYLD, strcpy)
+ STRCPY(VG_Z_DYLD, strcpy)
STRCPY(VG_Z_LIBC_SONAME, strcpy)
#endif
@@ -465,7 +465,7 @@
#elif defined(VGO_darwin)
//STRNCPY(VG_Z_LIBC_SONAME, strncpy)
- //STRNCPY(VG_Z_DYLD, strncpy)
+ STRNCPY(VG_Z_DYLD, strncpy)
STRNCPY(VG_Z_LIBC_SONAME, strncpy)
#endif
@@ -502,7 +502,7 @@
#elif defined(VGO_darwin)
//STRLCPY(VG_Z_LIBC_SONAME, strlcpy)
- //STRLCPY(VG_Z_DYLD, strlcpy)
+ STRLCPY(VG_Z_DYLD, strlcpy)
STRLCPY(VG_Z_LIBC_SONAME, strlcpy)
#endif
@@ -536,7 +536,7 @@
#elif defined(VGO_darwin)
//STRNCMP(VG_Z_LIBC_SONAME, strncmp)
- //STRNCMP(VG_Z_DYLD, strncmp)
+ STRNCMP(VG_Z_DYLD, strncmp)
STRNCMP(VG_Z_LIBC_SONAME, strncmp)
#endif
@@ -572,7 +572,7 @@
# endif
#elif defined(VGO_darwin)
- //STRCASECMP(VG_Z_LIBC_SONAME, strcasecmp)
+ STRCASECMP(VG_Z_LIBC_SONAME, strcasecmp)
#endif
@@ -609,8 +609,8 @@
# endif
#elif defined(VGO_darwin)
- //STRNCASECMP(VG_Z_LIBC_SONAME, strncasecmp)
- //STRNCASECMP(VG_Z_DYLD, strncasecmp)
+ STRNCASECMP(VG_Z_LIBC_SONAME, strncasecmp)
+ STRNCASECMP(VG_Z_DYLD, strncasecmp)
#endif
@@ -644,7 +644,7 @@
STRCASECMP_L(VG_Z_LIBC_SONAME, __GI___strcasecmp_l)
#elif defined(VGO_darwin)
- //STRCASECMP_L(VG_Z_LIBC_SONAME, strcasecmp_l)
+ STRCASECMP_L(VG_Z_LIBC_SONAME, strcasecmp_l)
#endif
@@ -679,8 +679,8 @@
STRNCASECMP_L(VG_Z_LIBC_SONAME, __GI_strncasecmp_l)
#elif defined(VGO_darwin)
- //STRNCASECMP_L(VG_Z_LIBC_SONAME, strncasecmp_l)
- //STRNCASECMP_L(VG_Z_DYLD, strncasecmp_l)
+ STRNCASECMP_L(VG_Z_LIBC_SONAME, strncasecmp_l)
+ STRNCASECMP_L(VG_Z_DYLD, strncasecmp_l)
#endif
@@ -743,8 +743,8 @@
MEMCHR(VG_Z_LIBC_SONAME, memchr)
#elif defined(VGO_darwin)
- //MEMCHR(VG_Z_LIBC_SONAME, memchr)
- //MEMCHR(VG_Z_DYLD, memchr)
+ MEMCHR(VG_Z_LIBC_SONAME, memchr)
+ MEMCHR(VG_Z_DYLD, memchr)
#endif
@@ -851,7 +851,7 @@
#elif defined(VGO_darwin)
// glider: see https://bugs.kde.org/show_bug.cgi?id=285662
MEMCPY(VG_Z_LIBC_SONAME, memcpy)
- //MEMCPY(VG_Z_DYLD, memcpy)
+ MEMCPY(VG_Z_DYLD, memcpy)
MEMCPY(VG_Z_LIBC_SONAME, memcpyZDVARIANTZDsse3x) /* memcpy$VARIANT$sse3x
*/
MEMCPY(VG_Z_LIBC_SONAME, memcpyZDVARIANTZDsse42) /* memcpy$VARIANT$sse42
*/
@@ -891,10 +891,10 @@
MEMCMP(VG_Z_LD_SO_1, bcmp)
#elif defined(VGO_darwin)
- //MEMCMP(VG_Z_LIBC_SONAME, memcmp)
- //MEMCMP(VG_Z_LIBC_SONAME, bcmp)
- //MEMCMP(VG_Z_DYLD, memcmp)
- //MEMCMP(VG_Z_DYLD, bcmp)
+ MEMCMP(VG_Z_LIBC_SONAME, memcmp)
+ MEMCMP(VG_Z_LIBC_SONAME, bcmp)
+ MEMCMP(VG_Z_DYLD, memcmp)
+ MEMCMP(VG_Z_DYLD, bcmp)
#endif
@@ -933,8 +933,8 @@
STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
#elif defined(VGO_darwin)
- //STPCPY(VG_Z_LIBC_SONAME, stpcpy)
- //STPCPY(VG_Z_DYLD, stpcpy)
+ STPCPY(VG_Z_LIBC_SONAME, stpcpy)
+ STPCPY(VG_Z_DYLD, stpcpy)
#endif
@@ -968,7 +968,7 @@
#elif defined(VGO_darwin)
//MEMSET(VG_Z_LIBC_SONAME, memset)
- //MEMSET(VG_Z_DYLD, memset)
+ MEMSET(VG_Z_DYLD, memset)
MEMSET(VG_Z_LIBC_SONAME, memset)
#endif
@@ -984,7 +984,7 @@
#elif defined(VGO_darwin)
// glider: see https://bugs.kde.org/show_bug.cgi?id=285662
MEMMOVE(VG_Z_LIBC_SONAME, memmove)
- //MEMMOVE(VG_Z_DYLD, memmove)#
+ MEMMOVE(VG_Z_DYLD, memmove)
MEMMOVE(VG_Z_LIBC_SONAME, memmoveZDVARIANTZDsse3x) /*
memmove$VARIANT$sse3x */
MEMMOVE(VG_Z_LIBC_SONAME, memmoveZDVARIANTZDsse42) /*
memmove$VARIANT$sse42 */
@@ -1019,7 +1019,7 @@
#elif defined(VGO_darwin)
//BCOPY(VG_Z_LIBC_SONAME, bcopy)
- //BCOPY(VG_Z_DYLD, bcopy)
+ BCOPY(VG_Z_DYLD, bcopy)
#endif
/*-------------------- memmove_chk --------------------*/
@@ -1223,7 +1223,7 @@
GLIBC25_MEMPCPY(VG_Z_LD_SO_1, mempcpy) /* ld.so.1 */
#elif defined(VGO_darwin)
- //GLIBC25_MEMPCPY(VG_Z_LIBC_SONAME, mempcpy)
+ GLIBC25_MEMPCPY(VG_Z_LIBC_SONAME, mempcpy)
#endif