From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52490 invoked by alias); 15 Nov 2016 15:39:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 52481 invoked by uid 89); 15 Nov 2016 15:39:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=complications X-HELO: relay1.mentorg.com Date: Tue, 15 Nov 2016 15:39:00 -0000 From: Joseph Myers To: Florian Weimer CC: Subject: Re: [PATCH] malloc: Deprecate hook variables, __default_morecore, In-Reply-To: <11f59117-e5a4-4c62-739c-e05e01ee43b3@redhat.com> Message-ID: References: <20161026150218.3F1A4439942E0@oldenburg.str.redhat.com> <11f59117-e5a4-4c62-739c-e05e01ee43b3@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2016-11/txt/msg00496.txt.bz2 On Tue, 15 Nov 2016, Florian Weimer wrote: > In my opinion, the larger ecosystem already provides suitable replacements. > > * and all malloc hook functions are now deprecated. Future > implementations of the mcheck- and mtrace-related functions will not > have any effect, and glibc will stop calling the hook functions from > its malloc implementation. Instead of mcheck and mtrace, developers > should consider using valgrind. As a replacement for the hook > functions, developers can interpose their own malloc implementation. I don't consider valgrind suitable for replacing the uses of mtrace in the glibc testsuite (or other similar uses elsewhere for lightweight checking for leaks). It's massively more heavyweight, has limited architecture support, as far as I know can only be built with an installed glibc and I don't know if there are other complications building it in a bootstrap environment. Whereas a simple preloadable interposing malloc implementation provided with glibc could support the mtrace functionality as well as providing an example for people writing interposing implementations to use. I don't know enough about the functionality GDB expects from linking with -lmcheck by default in development to know whether other malloc improvements would provide similar checking by default or whether that would also need GDB to provide its own malloc (again, I think valgrind is vastly too heavyweight for using by default in GDB development). -- Joseph S. Myers joseph@codesourcery.com