glibc/malloc
Siddhesh Poyarekar 2d2d9f2b48 Move malloc hooks into a compat DSO
Remove all malloc hook uses from core malloc functions and move it
into a new library libc_malloc_debug.so.  With this, the hooks now no
longer have any effect on the core library.

libc_malloc_debug.so is a malloc interposer that needs to be preloaded
to get hooks functionality back so that the debugging features that
depend on the hooks, i.e. malloc-check, mcheck and mtrace work again.
Without the preloaded DSO these debugging features will be nops.
These features will be ported away from hooks in subsequent patches.

Similarly, legacy applications that need hooks functionality need to
preload libc_malloc_debug.so.

The symbols exported by libc_malloc_debug.so are maintained at exactly
the same version as libc.so.

Finally, static binaries will no longer be able to use malloc
debugging features since they cannot preload the debugging DSO.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-07-22 18:37:59 +05:30
..
alloc_buffer_alloc_array.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_allocate.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_copy_bytes.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_copy_string.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_create_failure.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arena.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
Depend added rt to malloc/Depend [BZ #27132] 2021-02-23 10:04:45 +01:00
dynarray_at_failure.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray_emplace_enlarge.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray_finalize.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dynarray_resize_clear.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray_resize.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray-skeleton.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray.h malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
hooks.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
Makefile Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
malloc-check.c Move glibc.malloc.check implementation into its own file 2021-07-03 00:48:12 +05:30
malloc-debug.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
malloc-hooks.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
malloc-internal.h Add a generic malloc test for MALLOC_ALIGNMENT 2021-07-09 06:39:30 -07:00
malloc.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
malloc.h Remove __morecore and __default_morecore 2021-07-22 18:37:57 +05:30
mallocbug.c Reformat malloc to gnu style. 2014-01-02 09:40:10 +01:00
mcheck-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mcheck.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
mcheck.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memusage.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memusage.sh Remove all usage of @BASH@ or ${BASH} in installed files, and hardcode /bin/bash instead 2021-05-12 07:47:11 +05:30
memusagestat.c Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
morecore.c Remove __morecore and __default_morecore 2021-07-22 18:37:57 +05:30
mtrace.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
mtrace.pl Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
obstack.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
obstack.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
reallocarray.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
scratch_buffer_dupfree.c malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
scratch_buffer_grow_preserve.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
scratch_buffer_grow.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
scratch_buffer_set_array_size.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
set-freeres.c nptl: Move stack cache management, __libpthread_freeres into libc 2021-05-11 11:22:33 +02:00
thread-freeres.c dlfcn: dlerror needs to call free from the base namespace [BZ #24773] 2021-04-21 19:49:51 +02:00
tst-alloc_buffer.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-calloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-compathooks-off.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
tst-compathooks-on.c Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
tst-dynarray-at-fail.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-dynarray-fail.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
tst-dynarray-shared.h malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
tst-dynarray.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
tst-free-errno.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux-nothread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux-thread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-nothread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-skeleton.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-static-nothread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-static-thread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-thread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mallinfo2.c tst-mallinfo2.c: Use correct multiple for total variable 2021-05-25 16:47:01 -04:00
tst-malloc_info.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-backtrace.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-check.c tst-mcheck: Rename to tst-malloc-check 2021-06-22 14:31:40 +05:30
tst-malloc-fork-deadlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-stats-cancellation.c malloc: Run tst-malloc-stats-cancellation via test-driver.c 2021-04-07 02:35:50 +02:00
tst-malloc-tcache-leak.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-thread-exit.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-thread-fail.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-too-large.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-usable-tunables.c Initialize tunable list with the GLIBC_TUNABLES environment variable 2016-12-31 23:49:24 +05:30
tst-malloc-usable.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mallocalign1.c Add a generic malloc test for MALLOC_ALIGNMENT 2021-07-09 06:39:30 -07:00
tst-mallocfork2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mallocfork3.c posix: Add _Fork [BZ #4737] 2021-06-28 15:55:56 -03:00
tst-mallocfork.c Fix malloc tests build with GCC 10. 2019-06-10 22:12:08 +00:00
tst-mallocstate.c malloc: Turn tst-mallocstate into a non-internal test 2021-03-09 21:07:24 +01:00
tst-mallopt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-memalign.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mtrace.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mtrace.sh Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
tst-mxfast.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-obstack.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-posix_memalign.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-pvalloc-fortify.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-pvalloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-realloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-reallocarray.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-safe-linking.c tst-safe-linking: make false positives even more improbable 2021-07-19 08:29:25 +05:30
tst-scratch_buffer.c malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
tst-tcfree1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-tcfree2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-tcfree3.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-trim1.c * malloc/tst-trim1.c: New file. 2007-12-16 22:57:57 +00:00
tst-valloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30