This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] malloc: Remove malloc hooks (Bug 23328)
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: DJ Delorie <dj at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Fri, 6 Jul 2018 10:59:43 -0400
- Subject: Re: [PATCH v2] malloc: Remove malloc hooks (Bug 23328)
- References: <ddf39fca-aa0a-9b14-ee78-a1bfa1225623@redhat.com> <87efgl3ez8.fsf@mid.deneb.enyo.de>
On 07/02/2018 10:10 AM, Florian Weimer wrote:
> * Carlos O'Donell:
>
>> For applications that require the hooks the functionality is moved
>> entirely to a new shared library: libmalloc-extras.so. Applications
>> should preload libmalloc-extras.so to get back the lost functionality.
>> Static applications are not supported, but continue to operate with
>> APIs doing nothing or returning errors depending on their semantics.
>
> Usuallly, we remove functionality which is turned into compat symbols
> outright. Why aren't we doing this here?
All functionality which is turned into compat symbols is no longer
available to static applications.
What I meant by the last sentence is that if a static application calls
mallopt with M_CHECK_ACTION set to 3, that will do nothing, because
the hooks required to implement this action are no longer doing anything,
and you can't preload libmalloc-extras.so to support this usage.
The APIs which "optionally" catch errors no longer catch errors because
their underlying implementation, the hooks, has been removed.
A static application can no longer access the hooks because they don't
exist in any header, but can still call functions which need the hooks
to operate correctly. Until we reimplement the behaviour without hooks
the functions aren't going to do anything useful in a static program.
Does that answer your question?
--
Cheers,
Carlos.