diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-06-10 10:46:05 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-06-10 10:46:05 +0200 |
commit | 2ba3cfa1607c36613f3b30fb1ae4ec530245ce64 (patch) | |
tree | 4c215fe75ef1c016943e36821137257480097e01 /malloc/arena.c | |
parent | f00faa4a43706d85ad8d4d2c970d3f52f0f63bfb (diff) | |
download | glibc-2ba3cfa1607c36613f3b30fb1ae4ec530245ce64.zip glibc-2ba3cfa1607c36613f3b30fb1ae4ec530245ce64.tar.gz glibc-2ba3cfa1607c36613f3b30fb1ae4ec530245ce64.tar.bz2 |
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>.
Diffstat (limited to 'malloc/arena.c')
-rw-r--r-- | malloc/arena.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index 1dd9dee..64a118c 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -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; } |