This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] malloc: Remove malloc hooks (Bug 23328)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]