Backed out changeset 4230d328b65f (bug 801571) for memory leaks.

This commit is contained in:
Ryan VanderMeulen 2014-01-17 14:25:28 -05:00
parent 9aca2e7e9a
commit 41ae41c2b0
3 changed files with 0 additions and 55 deletions

View File

@ -7035,7 +7035,6 @@ if test -n "$_WRAP_MALLOC"; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=vasprintf,--wrap=asprintf"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
dnl Wrap operator new and operator delete on Android.
if test "$OS_TARGET" = "Android"; then

View File

@ -88,51 +88,6 @@ strdup_impl(const char *src)
}
#endif /* XP_DARWIN */
#ifdef ANDROID
#include <stdarg.h>
MOZ_MEMORY_API int
vasprintf_impl(char **str, const char *fmt, va_list ap)
{
if (str == NULL || fmt == NULL) {
return -1;
}
char* ptr = (char*)malloc_impl(128);
if (ptr == NULL) {
return -1;
}
int ret = vsnprintf(ptr, 128, fmt, ap);
if (ret < 0) {
free_impl(ptr);
return ret;
}
char* _ptr = realloc_impl(ptr, ret + 1);
if (_ptr == NULL) {
return -1;
}
*str = _ptr;
return ret;
}
MOZ_MEMORY_API int
asprintf_impl(char **str, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
int ret = vasprintf_impl(str, fmt, ap);
va_end(ap);
return ret;
}
#endif
#ifdef XP_WIN
/*
* There's a fun allocator mismatch in (at least) the VS 2010 CRT

View File

@ -212,15 +212,6 @@
# define wcsdup_impl mozmem_dup_impl(wcsdup)
#endif
/* String functions */
#ifdef ANDROID
/* Bug 801571 and Bug 879668, libstagefright uses vasprintf, causing malloc()/
* free() to be mismatched between bionic and mozglue implementation.
*/
#define vasprintf_impl mozmem_dup_impl(vasprintf)
#define asprintf_impl mozmem_dup_impl(asprintf)
#endif
/* Jemalloc specific function */
#define jemalloc_stats_impl mozmem_jemalloc_impl(jemalloc_stats)
#define jemalloc_purge_freed_pages_impl mozmem_jemalloc_impl(jemalloc_purge_freed_pages)