[PATCH v10 00/11] malloc hooks removal
Siddhesh Poyarekar
siddhesh@gotplt.org
Wed Jul 21 09:45:10 GMT 2021
On 7/20/21 12:16 AM, Siddhesh Poyarekar via Libc-alpha wrote:
> This patchset removes the malloc hooks __malloc_hook, __free_hook,
> __realloc_hook and __memalign_hook from the API and leaves compatibility
> symbols so that existing applications can continue to link to them. The
> reading and execution of the hooks has been moved to a DSO
> libc_malloc_debug.so, which can be preloaded for applications that need
> it. By default these hooks no longer have any effect in the library.
>
> Further, debugging features such as MALLOC_CHECK_, mcheck() and mtrace
> have been weaned away from these hooks and also moved to
> libc_malloc_debug.so. With this change, these features are only enabled
> when libc_malloc_debug.so is preloaded using LD_PRELOAD.
>
> Finally, the __morecore, __morecore_after_hook and __default_morecore
> hooks have also been moved to compat symbols and removed from the API.
> Existing applications will continue to link to them but they won't have
> any effect on malloc behaviour.
>
> Testing:
>
> - x86_64 - --prefix=/usr:
> No new failures
> - x86_64, i686, s390x, ppc64le, armv7l, aarch64 - Fedora config:
> No new failures
> - build-many-glibcs:
> In progress
Finally after a few hurdles I have managed to finish the
build-many-glibcs run and it has finished cleanly with the exception of
alpha-linux-gnu, which failed when building compilers. It appears to be
due to the fix for pr27283 not being on the 2.36 branch.
Siddhesh
More information about the Libc-alpha
mailing list