mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Bobby Powers <bobbypowers@gmail.com>
To: musl@lists.openwall.com
Subject: Re: tcmalloc compatibility
Date: Tue, 10 Apr 2018 10:45:03 -0400	[thread overview]
Message-ID: <CAArOQ2WK0-WCgf9unNPnQv0ZVRtV1PgOm2wQwEW808nhBx3yOQ@mail.gmail.com> (raw)
In-Reply-To: <20180410143359.GF3094@brightrain.aerifal.cx>

On Tue, Apr 10, 2018 at 2:34 PM Rich Felker <dalias@libc.org> wrote:
> This claim doesn't seem to be well-justified. Myself and members of
> our community have written a lot on why existing malloc interposition
> hacks are broken, but there's also an interest in what would take to
> make it work, and I particularly am interested in this from a
> standpoint that musl's malloc is not very good, and that being able to
> dynamically interpose it would facilitate developing and testing a
> replacement.

This sounds super interesting -- what needs to happen to make progress
on this?  I would love to help out.

> Note however that if malloc interposition is supported at some point,
> there will be a specification for constraints on the malloc
> implementation including what functions you can call from it (e.g.
> something like AS-safety), and bug reports for implementations that do
> things outside this spec (and thereby inherently can't work safely or
> reliably) will not be considered bugs.

That sounds reasonable.  Some existing software (like Hoard) goes out
of its way to interpose on all functions that might call into malloc
to ensure the system allocator isn't called indirectly:

https://github.com/emeryberger/Heap-Layers/blob/master/wrappers/wrapper.cpp

yours,
Bobby


  reply	other threads:[~2018-04-10 14:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10 10:22 Denis V. Razumovsky
2018-04-10 14:33 ` Rich Felker
2018-04-10 14:45   ` Bobby Powers [this message]
2018-04-10 15:35     ` Rich Felker
     [not found]   ` <878t9vlzh1.fsf@mid.deneb.enyo.de>
2018-04-10 18:39     ` Rich Felker
2018-04-10 20:33     ` Szabolcs Nagy
2018-04-10 20:44       ` Rich Felker
2018-04-10 21:17         ` Szabolcs Nagy
2018-04-15 11:52           ` ardi
2018-04-16  4:19             ` Markus Wichmann
2018-04-16  4:40               ` Rich Felker
2018-04-18 20:35                 ` Rich Felker
2018-04-19 18:27                   ` Szabolcs Nagy
2018-04-19 19:11                     ` Rich Felker
2018-04-18 20:50       ` Florian Weimer
2018-04-18 21:06         ` Rich Felker

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=CAArOQ2WK0-WCgf9unNPnQv0ZVRtV1PgOm2wQwEW808nhBx3yOQ@mail.gmail.com \
    --to=bobbypowers@gmail.com \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).