This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Overriding malloc
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 01 Jul 2014 10:28:37 +0200
- Subject: Overriding malloc
- Authentication-results: sourceware.org; auth=none
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