This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] malloc: Deprecate hook variables, __default_morecore, <mcheck.h>
- From: Florian Weimer <fweimer at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 15 Nov 2016 14:22:30 +0100
- Subject: Re: [PATCH] malloc: Deprecate hook variables, __default_morecore, <mcheck.h>
- Authentication-results: sourceware.org; auth=none
- References: <20161026150218.3F1A4439942E0@oldenburg.str.redhat.com> <alpine.DEB.2.20.1610261548400.23075@digraph.polyomino.org.uk>
On 10/26/2016 05:55 PM, Joseph Myers wrote:
On Wed, 26 Oct 2016, Florian Weimer wrote:
The functionality in <mcheck.h> will eventually be replaced with
no-op functions (and a separate, preloadable DSO).
If you declare functionality deprecated then you need to update the manual
accordingly. But I don't think the right approach is to declare
deprecated on an "eventually be replaced" basis. Rather, the deprecation
and the new DSO should be in the same patch series, going in the same
glibc version, so the NEWS file and the main documentation can tell users
of the mtrace script to preload the DSO and remove calls to the mtrace
function (if that's the intended way to update code using mtrace and the
one to be used for all the glibc tests that make use of it).
In my opinion, the larger ecosystem already provides suitable replacements.
* <mcheck.h> 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.
Plus removal of the documentation of the hook functions from the manual
(if there is anything left).
In any case, I'll submit a separate patch for documenting the malloc
interposition feature (bug 20424).
Thanks,
Florian