mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
malloc: Remove __malloc_initialize_hook from the API [BZ #19564]
__malloc_initialize_hook is interposed by application code, so the usual approach to define a compatibility symbol does not work. This commit adds a new mechanism based on #pragma GCC poison in <stdc-predef.h>.
This commit is contained in:
@ -340,9 +340,11 @@ ptmalloc_init (void)
|
||||
if (check_action != 0)
|
||||
__malloc_check_init ();
|
||||
}
|
||||
void (*hook) (void) = atomic_forced_read (__malloc_initialize_hook);
|
||||
#if HAVE_MALLOC_INIT_HOOK
|
||||
void (*hook) (void) = atomic_forced_read (old__malloc_initialize_hook);
|
||||
if (hook != NULL)
|
||||
(*hook)();
|
||||
#endif
|
||||
__malloc_initialized = 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user