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]

Overriding malloc


We need to support overriding malloc through LD_PRELOAD and other forms of symbol interposition. Once you override malloc, you also have to override free, realloc and calloc at least.

If the application (or one of its libraries) uses posix_memalign etc., these have to be overridden as well. Same for the malloc_usable_size.

The question is if overriding those should is required even if the application does not call those fringe malloc-related functions, i.e. if glibc should behave as if it never calls them if malloc has been overridden.

If yes, we should likely remove the remaining call to malloc_usable_size from the code base.

--
Florian Weimer / Red Hat Product Security


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