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: Should malloc-related functions be weak?


Florian Weimer <fw@deneb.enyo.de> writes:

> * DJ Delorie:
>
>> "Tulio Magno Quites Machado Filho" <tuliom@linux.vnet.ibm.com> writes:
>>> Shouldn't they be weak functions?
>>
>> I can imagine the mess that would happen if someone overwrode malloc()
>> but not free()...
>
> The problem is with the other symbols Tulio identified.  I'll try to
> see if providing weak stubs for them addresses the issue.

Do you plan to change it for 2.24?

Let me elaborate...
Right now, both tcmalloc and jemalloc cannot link statically against glibc
2.24 and I'm trying to:
 - Make they link statically again.
 - Remove all references to __malloc_initialize_hook (even outdated source
   code comments).
 - Stop using all the other malloc hooks.
 - Improve documentation on this, so that we can provide an answer to the
   following open questions:
   - https://sourceware.org/bugzilla/show_bug.cgi?id=2765
   - https://sourceware.org/bugzilla/show_bug.cgi?id=16939

-- 
Tulio Magno


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