Restore malloc debug.

Some libc changes were preventing the initialization call from being made.
The basic problem appears to be that libc_init_common.c is only built once,
and it's only built for the non-debug libc.
This commit is contained in:
Andy McFadden
2009-07-21 15:25:23 -07:00
parent b56b5659b3
commit 39f3745cf3
4 changed files with 21 additions and 16 deletions

View File

@@ -68,6 +68,12 @@ __noreturn void __libc_init(uintptr_t *elfdata,
/* Initialize the C runtime environment */
__libc_init_common(elfdata);
#ifdef MALLOC_LEAK_CHECK
/* setup malloc leak checker, requires system properties */
extern void malloc_debug_init(void);
malloc_debug_init();
#endif
/* Several Linux ABIs don't pass the onexit pointer, and the ones that
* do never use it. Therefore, we ignore it.
*/