From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12688 Path: news.gmane.org!.POSTED!not-for-mail From: Bobby Powers Newsgroups: gmane.linux.lib.musl.general Subject: Re: tcmalloc compatibility Date: Tue, 10 Apr 2018 10:45:03 -0400 Message-ID: References: <0ea267bf-ea3a-9810-be1a-50e71b6cfce1@denis.im> <20180410143359.GF3094@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1523371394 29718 195.159.176.226 (10 Apr 2018 14:43:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 10 Apr 2018 14:43:14 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12703-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 10 16:43:10 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1f5uUI-0007d2-Dl for gllmg-musl@m.gmane.org; Tue, 10 Apr 2018 16:43:10 +0200 Original-Received: (qmail 9482 invoked by uid 550); 10 Apr 2018 14:45:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 9461 invoked from network); 10 Apr 2018 14:45:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Bi0IaHu1l0zVQ1KTLdpRGrlgUGkMacjPIdKWatIyfc8=; b=I3tSrueyl8+upybQdL5qwCW4eQBUrAzsiPA7OcP3ppwMlOrdWpKduACadkOHCBxLOU CMaUqacbhWLOVPhhc4MCh5/Br+r8ROgmd9rwOnAKBDfh1broLuc9GIeJXVBfXT7xb8g/ AzGGOiTHWn31I/clcOgDrTYrq0x3SbiaZz0QJst+UHyMoG6MdN6Dhm4+FnAzia0vMVtR 23jYXISUZuWdSRhjz1uZd5IzPlCgFpsVDgfbHqrcd0CEFDm0QBiB1MPSjmk6KTw4bGEV 028dYsYwmNMDkuQjFFzJo9tjem9v4L8BmYWwjaX6VE6+yj0jLkeqWJkHw1csDuNJ8xge 198g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Bi0IaHu1l0zVQ1KTLdpRGrlgUGkMacjPIdKWatIyfc8=; b=dQO9rywSQY+jef9bzVIgZL2zH9jApx/+3yVppU8RoWyQK4fdzh84N6eJBY7X6GLWSE S/2rUJGqTNM508ESIqjIngJ2r8DtfolFgXHANBiRtRr074QkNiJYa8obqXpA4eFWcWZ7 xv7mmvR5HObFermXKjATkqtm7qx07IIqylsyeP41vcDtvvY2oMZRm4pt4BAqMttG5YGk Sw1XXP7sugOp00VVeOT6+ccAENb5XuALyYgIaIS8we43lzAREjb+K6bVd/MmaUSL7cX6 9EIeNNCYLy4zAK4jvQ//G4CChUbSK0l/QKz49Wi1XnypqDZLvtpvOQm8na5uWvJJvhuU nTdQ== X-Gm-Message-State: ALQs6tBBxbQHZ/o1xEWf/V5F5OnAb1+jSQNfWoUG28E+NY3Mkgb3SlwJ zn8fJLdxC7OHcItQCcT3Vk3E+dVZpW7E2TkIUW3EJRUW X-Google-Smtp-Source: AIpwx49AbFoezxhtxejvlOR3HQZ762yJ1LaazTMOv0BXknwNHO+1RRt/XOYHXKy3PmG8XTOCgBSu+8GU/9OJlRP/goo= X-Received: by 2002:aca:b606:: with SMTP id g6-v6mr444861oif.203.1523371503930; Tue, 10 Apr 2018 07:45:03 -0700 (PDT) In-Reply-To: <20180410143359.GF3094@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:12688 Archived-At: On Tue, Apr 10, 2018 at 2:34 PM Rich Felker 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