diff options
author | Stafford Horne <shorne@gmail.com> | 2021-10-13 19:43:30 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2021-11-17 21:33:39 +0900 |
commit | f1bcfde3a7b1b2606ff9f267e1e4a9cd7c65497a (patch) | |
tree | e860822fd8a9bc2cd058745600be3a589d0aabfe /malloc | |
parent | f1d333b5bfdb3561c93feb4b5653d051c3258c59 (diff) | |
download | glibc-f1bcfde3a7b1b2606ff9f267e1e4a9cd7c65497a.tar glibc-f1bcfde3a7b1b2606ff9f267e1e4a9cd7c65497a.tar.gz glibc-f1bcfde3a7b1b2606ff9f267e1e4a9cd7c65497a.tar.bz2 glibc-f1bcfde3a7b1b2606ff9f267e1e4a9cd7c65497a.zip |
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>
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/malloc-debug.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/malloc/malloc-debug.c b/malloc/malloc-debug.c index 3d7e6d44fd..99aa95b145 100644 --- a/malloc/malloc-debug.c +++ b/malloc/malloc-debug.c @@ -24,7 +24,6 @@ #include <unistd.h> #include <sys/param.h> -#if SHLIB_COMPAT (libc_malloc_debug, GLIBC_2_0, GLIBC_2_34) /* Support only the glibc allocators. */ extern void *__libc_malloc (size_t); extern void __libc_free (void *); @@ -669,4 +668,3 @@ compat_symbol (libc_malloc_debug, __free_hook, __free_hook, GLIBC_2_0); compat_symbol (libc_malloc_debug, __malloc_hook, __malloc_hook, GLIBC_2_0); compat_symbol (libc_malloc_debug, __realloc_hook, __realloc_hook, GLIBC_2_0); compat_symbol (libc_malloc_debug, __memalign_hook, __memalign_hook, GLIBC_2_0); -#endif |