From 0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 22 Jul 2021 18:38:10 +0530 Subject: Move malloc_{g,s}et_state to libc_malloc_debug These deprecated functions are only safe to call from __malloc_initialize_hook and as a result, are not useful in the general case. Move the implementations to libc_malloc_debug so that existing binaries that need it will now have to preload the debug DSO to work correctly. This also allows simplification of the core malloc implementation by dropping all the undumping support code that was added to make malloc_set_state work. One known breakage is that of ancient emacs binaries that depend on this. They will now crash when running with this libc. With LD_BIND_NOW=1, it will terminate immediately because of not being able to find malloc_set_state but with lazy binding it will crash in unpredictable ways. It will need a preloaded libc_malloc_debug.so so that its initialization hook is executed to allow its malloc implementation to work properly. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/aarch64/libc.abilist | 2 -- 1 file changed, 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux/aarch64/libc.abilist') diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 8d49fc0835..21a2e50a88 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -1324,9 +1324,7 @@ GLIBC_2.17 madvise F GLIBC_2.17 makecontext F GLIBC_2.17 mallinfo F GLIBC_2.17 malloc F -GLIBC_2.17 malloc_get_state F GLIBC_2.17 malloc_info F -GLIBC_2.17 malloc_set_state F GLIBC_2.17 malloc_stats F GLIBC_2.17 malloc_trim F GLIBC_2.17 malloc_usable_size F -- cgit 1.4.1