public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: DJ Delorie <dj@redhat.com>
Cc: GLIBC patches <libc-alpha@sourceware.org>
Subject: Re: [PATCH v10 00/11] malloc hooks removal
Date: Sat, 9 Oct 2021 08:29:47 +0900	[thread overview]
Message-ID: <CAAfxs74P0Dd=rHwSO5c=4MXi62rK7EOU2FWayjhRemh3b0kh1Q@mail.gmail.com> (raw)
In-Reply-To: <xnsfxbw14u.fsf@greed.delorie.com>

On Sat, Oct 9, 2021 at 8:24 AM DJ Delorie <dj@redhat.com> wrote:
>
> Stafford Horne <shorne@gmail.com> writes:
> > Is the issue in malloc/malloc-debug.c?  There is a big if for
> > GLIBC_2_0 -> GLIBC_2_34.
> > It seems from GLIBC_2_35 nothing is available any longer.  Is that
> > correct, that is what is happening.
>
> Yes.  Old ports get compatibility symbols that do nothing.  New ports
> get no symbols since there are no old apps that would have been linked
> against them.
>
> If yours is the first new port since we made this change, there might be
> some debugging needed...

I think maybe this is the issue.  The first #if is not terminated, and
it keeps the include of mtrace.c/mcheck.c from being included.  Those
includes should provide the real implementations of mtrace/muntrace to
be overloaded with the LD_PRELOAD.

I am not sure where we should end the if though.  I can test something.

#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 *);
extern void *__libc_realloc (void *, size_t);
extern void *__libc_memalign (size_t, size_t);
extern void *__libc_valloc (size_t);
extern void *__libc_pvalloc (size_t);
extern void *__libc_calloc (size_t, size_t);

....

#include "mcheck.c"
#include "mtrace.c"
#include "malloc-check.c"

#if SHLIB_COMPAT (libc_malloc_debug, GLIBC_2_0, GLIBC_2_24)
extern void (*__malloc_initialize_hook) (void);
compat_symbol_reference (libc, __malloc_initialize_hook,
                         __malloc_initialize_hook, GLIBC_2_0);
#endif

  reply	other threads:[~2021-10-08 23:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 18:46 Siddhesh Poyarekar
2021-07-19 18:46 ` [PATCH v10 01/11] Make mcheck tests conditional on GLIBC_2.23 or earlier Siddhesh Poyarekar
2021-07-22 12:26   ` Carlos O'Donell
2021-07-19 18:46 ` [PATCH v10 02/11] Remove __after_morecore_hook Siddhesh Poyarekar
2021-07-19 18:46 ` [PATCH v10 03/11] Remove __morecore and __default_morecore Siddhesh Poyarekar
2021-07-19 18:46 ` [PATCH v10 04/11] Move malloc hooks into a compat DSO Siddhesh Poyarekar
2021-07-22 12:25   ` Carlos O'Donell
2021-07-19 18:46 ` [PATCH v10 05/11] mcheck: Wean away from malloc hooks [BZ #23489] Siddhesh Poyarekar
2021-07-22 19:57   ` Matheus Castanho
2021-07-23  2:25     ` [PATCH] Fix build and tests with --disable-tunables Siddhesh Poyarekar
2021-07-23  4:55       ` Carlos O'Donell
2021-07-19 18:46 ` [PATCH v10 06/11] Simplify __malloc_initialized Siddhesh Poyarekar
2021-07-19 18:46 ` [PATCH v10 07/11] mtrace: Wean away from malloc hooks Siddhesh Poyarekar
2021-07-19 18:46 ` [PATCH v10 08/11] glibc.malloc.check: " Siddhesh Poyarekar
2021-07-22 12:25   ` Carlos O'Donell
2021-07-19 18:46 ` [PATCH v10 09/11] Move malloc_{g,s}et_state to libc_malloc_debug Siddhesh Poyarekar
2021-07-22 12:25   ` Carlos O'Donell
2021-07-19 18:46 ` [PATCH v10 10/11] Remove malloc hooks [BZ #23328] Siddhesh Poyarekar
2021-07-19 18:46 ` [PATCH v10 11/11] mcheck Fix malloc_usable_size [BZ #22057] Siddhesh Poyarekar
2021-07-21  9:45 ` [PATCH v10 00/11] malloc hooks removal Siddhesh Poyarekar
2021-10-08 21:47 ` Stafford Horne
2021-10-08 22:22   ` DJ Delorie
2021-10-08 23:18     ` Stafford Horne
2021-10-08 23:24       ` DJ Delorie
2021-10-08 23:29         ` Stafford Horne [this message]
2021-10-08 23:48           ` Stafford Horne
2021-10-11  2:40             ` Siddhesh Poyarekar
2021-10-11  1:55   ` Siddhesh Poyarekar
2021-10-11  2:19     ` Siddhesh Poyarekar

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='CAAfxs74P0Dd=rHwSO5c=4MXi62rK7EOU2FWayjhRemh3b0kh1Q@mail.gmail.com' \
    --to=shorne@gmail.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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).