From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: Stafford Horne <shorne@gmail.com>,
GLIBC patches <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2] malloc: Fix malloc debug for 2.35 onwards
Date: Wed, 17 Nov 2021 09:14:15 +0530 [thread overview]
Message-ID: <232c045f-6f93-6f2a-2e86-7e22f653b77f@gotplt.org> (raw)
In-Reply-To: <20211116213225.3032782-1-shorne@gmail.com>
On 11/17/21 03:02, Stafford Horne wrote:
> 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.
LGTM. I verified that the only change to the build in x86_64 is in the
debug sections to account for change in line numbers.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
>
> Fixes: 1e5a5866cb ("Remove malloc hooks [BZ #23328]")
> Cc: Siddhesh Poyarekar <siddhesh@gotplt.org>
> ---
>
> Changes since v2:
> - Just remove SHLIB_COMPAT, using compat_symbol seems to do what
> Siddhesh was explaining he wanted to do.
>
> malloc/malloc-debug.c | 2 --
> 1 file changed, 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
>
prev parent reply other threads:[~2021-11-17 3:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 21:32 Stafford Horne
2021-11-16 21:38 ` Stafford Horne
2021-11-17 3:44 ` Siddhesh Poyarekar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=232c045f-6f93-6f2a-2e86-7e22f653b77f@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=libc-alpha@sourceware.org \
--cc=shorne@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).