glibc/malloc
Stafford Horne f1bcfde3a7 malloc: Fix malloc debug for 2.35 onwards
The change 1e5a5866cb ("Remove malloc hooks [BZ #23328]") has broken
ports that are using GLIBC_2_35, like the new OpenRISC port I am working
on.

The libc_malloc_debug.so library used to bring in the debug
infrastructure is currently essentially empty for GLIBC_2_35 ports like
mine causing mtrace tests to fail:

    cat sysdeps/unix/sysv/linux/or1k/shlib-versions
    DEFAULT                 GLIBC_2.35
    ld=ld-linux-or1k.so.1

    FAIL: posix/bug-glob2-mem
    FAIL: posix/bug-regex14-mem
    FAIL: posix/bug-regex2-mem
    FAIL: posix/bug-regex21-mem
    FAIL: posix/bug-regex31-mem
    FAIL: posix/bug-regex36-mem
    FAIL: malloc/tst-mtrace.

The issue seems to be with the ifdefs in malloc/malloc-debug.c. The
ifdefs are currently essentially exluding all symbols for ports > 2.35.

Removing the top level SHLIB_COMPAT ifdef allows things to just work.

Fixes: 1e5a5866cb ("Remove malloc hooks [BZ #23328]")
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2021-11-17 21:33:39 +09:00
..
alloc_buffer_alloc_array.c
alloc_buffer_allocate.c
alloc_buffer_copy_bytes.c
alloc_buffer_copy_string.c
alloc_buffer_create_failure.c
arena.c misc: Add __get_nprocs_sched 2021-09-27 09:13:06 -03:00
Depend
dynarray_at_failure.c
dynarray_emplace_enlarge.c
dynarray_finalize.c
dynarray_resize_clear.c
dynarray_resize.c
dynarray-skeleton.c
dynarray.h
hooks.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Makefile tst-mxfast: Don't run with mcheck 2021-08-05 07:36:55 +05:30
malloc-check.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
malloc-debug.c malloc: Fix malloc debug for 2.35 onwards 2021-11-17 21:33:39 +09:00
malloc-internal.h Add a generic malloc test for MALLOC_ALIGNMENT 2021-07-09 06:39:30 -07:00
malloc.c Handle NULL input to malloc_usable_size [BZ #28506] 2021-10-29 14:53:55 +05:30
malloc.h Add alloc_align attribute to memalign et al 2021-10-21 00:19:20 +01:00
mallocbug.c
mcheck-impl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
mcheck-init.c
mcheck.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
mcheck.h
memusage.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memusage.sh Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memusagestat.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
morecore.c Remove __morecore and __default_morecore 2021-07-22 18:37:57 +05:30
mtrace-impl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
mtrace.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
mtrace.pl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
obstack.c
obstack.h
reallocarray.c
scratch_buffer_dupfree.c
scratch_buffer_grow_preserve.c
scratch_buffer_grow.c
scratch_buffer_set_array_size.c
set-freeres.c elf: Introduce GLRO (dl_libc_freeres), called from __libc_freeres 2021-11-17 12:20:29 +01:00
thread-freeres.c
tst-alloc_buffer.c
tst-calloc.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
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
tst-dynarray-fail.c
tst-dynarray-shared.h
tst-dynarray.c Disable -Waggressive-loop-optimizations warnings in tst-dynarray.c 2021-10-29 14:40:45 +00:00
tst-free-errno.c
tst-interpose-aux-nothread.c
tst-interpose-aux-thread.c
tst-interpose-aux.c
tst-interpose-aux.h
tst-interpose-nothread.c
tst-interpose-skeleton.c
tst-interpose-static-nothread.c
tst-interpose-static-thread.c
tst-interpose-thread.c
tst-mallinfo2.c tst-mallinfo2.c: Use correct multiple for total variable 2021-05-25 16:47:01 -04:00
tst-malloc_info.c
tst-malloc-backtrace.c
tst-malloc-check.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-malloc-fork-deadlock.c
tst-malloc-stats-cancellation.c
tst-malloc-tcache-leak.c
tst-malloc-thread-exit.c
tst-malloc-thread-fail.c
tst-malloc-too-large.c
tst-malloc-usable-tunables.c
tst-malloc-usable.c Handle NULL input to malloc_usable_size [BZ #28506] 2021-10-29 14:53:55 +05:30
tst-malloc.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mallocalign1.c Add a generic malloc test for MALLOC_ALIGNMENT 2021-07-09 06:39:30 -07:00
tst-mallocfork2.c
tst-mallocfork3.c posix: Add _Fork [BZ #4737] 2021-06-28 15:55:56 -03:00
tst-mallocfork.c
tst-mallocstate.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-mallopt.c
tst-memalign.c
tst-mtrace.c
tst-mtrace.sh Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
tst-mxfast.c
tst-obstack.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-posix_memalign.c
tst-pvalloc-fortify.c
tst-pvalloc.c
tst-realloc.c
tst-reallocarray.c
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
tst-tcfree1.c
tst-tcfree2.c
tst-tcfree3.c
tst-trim1.c
tst-valloc.c
Versions Move malloc_{g,s}et_state to libc_malloc_debug 2021-07-22 18:38:10 +05:30