From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30656 invoked from network); 12 Jun 2020 17:42:13 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 12 Jun 2020 17:42:13 -0000 Received: (qmail 16107 invoked by uid 550); 12 Jun 2020 17:42:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 16086 invoked from network); 12 Jun 2020 17:42:12 -0000 Date: Fri, 12 Jun 2020 19:42:00 +0200 From: Szabolcs Nagy To: Rich Felker Cc: musl@lists.openwall.com Message-ID: <20200612174200.GA2048759@port70.net> Mail-Followup-To: Rich Felker , musl@lists.openwall.com References: <20200609035010.GE1079@brightrain.aerifal.cx> <20200609110914.GC871552@port70.net> <20200609200800.GG1079@brightrain.aerifal.cx> <20200610005825.GI1079@brightrain.aerifal.cx> <20200610083306.GD871552@port70.net> <20200611200530.GQ1079@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200611200530.GQ1079@brightrain.aerifal.cx> Subject: Re: [musl] mallocng switchover - opportunity to test * Rich Felker [2020-06-11 16:05:30 -0400]: > On Wed, Jun 10, 2020 at 10:33:06AM +0200, Szabolcs Nagy wrote: > > > > I'm not sure about this, and how it interacts with our definition of > > > > posix_memalign and memalign in terms of aligned_alloc. > > > > > > What do you think of this proposal: > > > > > > Have ldso track both whether malloc was replaced and whether > > > aligned_alloc was replaced. If malloc was replaced but aligned_alloc > > > wasn't, aligned_alloc fails with ENOMEM. If both were replaced and our > > > internal aligned_alloc still gets called, assume some sort of wrapping > > > is going on and allow it to proceed. > > > > > > With mallocng, this is "safe" against misuse in the sense that it will > > > trap rather than corrupting memory if the contract is violated. > > > > sounds good to me. > > As of commit 1fc67fc117f9d25d240d46bbef78ebccacec7097 it should behave > as proposed here. Does this look/behave like what you expected? yes this works for me, thanks.