diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-07-22 18:38:10 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-07-22 18:38:10 +0530 |
commit | 0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd (patch) | |
tree | baf150b3e1b728c6c13b95116241a61bff5f21ab /sysdeps/unix/sysv/linux/powerpc | |
parent | b5bd5bfe88f496463ec9fab680a8edf64d7c2a42 (diff) | |
download | glibc-0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd.tar.gz glibc-0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd.tar.xz glibc-0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd.zip |
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 <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
8 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 105dda5300..7961a99f4a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -782,8 +782,6 @@ GLIBC_2.0 lseek F GLIBC_2.0 madvise F GLIBC_2.0 mallinfo F GLIBC_2.0 malloc F -GLIBC_2.0 malloc_get_state F -GLIBC_2.0 malloc_set_state F GLIBC_2.0 malloc_stats F GLIBC_2.0 malloc_trim F GLIBC_2.0 malloc_usable_size F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc_malloc_debug.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc_malloc_debug.abilist index 6b3c5bfd0b..55ef952885 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc_malloc_debug.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc_malloc_debug.abilist @@ -6,6 +6,8 @@ GLIBC_2.0 calloc F GLIBC_2.0 free F GLIBC_2.0 mallinfo F GLIBC_2.0 malloc F +GLIBC_2.0 malloc_get_state F +GLIBC_2.0 malloc_set_state F GLIBC_2.0 malloc_stats F GLIBC_2.0 malloc_trim F GLIBC_2.0 malloc_usable_size F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index b079847f84..146e27aac6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -782,8 +782,6 @@ GLIBC_2.0 lseek F GLIBC_2.0 madvise F GLIBC_2.0 mallinfo F GLIBC_2.0 malloc F -GLIBC_2.0 malloc_get_state F -GLIBC_2.0 malloc_set_state F GLIBC_2.0 malloc_stats F GLIBC_2.0 malloc_trim F GLIBC_2.0 malloc_usable_size F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc_malloc_debug.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc_malloc_debug.abilist index 6b3c5bfd0b..55ef952885 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc_malloc_debug.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc_malloc_debug.abilist @@ -6,6 +6,8 @@ GLIBC_2.0 calloc F GLIBC_2.0 free F GLIBC_2.0 mallinfo F GLIBC_2.0 malloc F +GLIBC_2.0 malloc_get_state F +GLIBC_2.0 malloc_set_state F GLIBC_2.0 malloc_stats F GLIBC_2.0 malloc_trim F GLIBC_2.0 malloc_usable_size F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist index 0b7700cb84..cf864632d0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist @@ -1301,8 +1301,6 @@ GLIBC_2.3 madvise F GLIBC_2.3 makecontext F GLIBC_2.3 mallinfo F GLIBC_2.3 malloc F -GLIBC_2.3 malloc_get_state F -GLIBC_2.3 malloc_set_state F GLIBC_2.3 malloc_stats F GLIBC_2.3 malloc_trim F GLIBC_2.3 malloc_usable_size F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc_malloc_debug.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc_malloc_debug.abilist index 7f134f9b48..9f54dfd562 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc_malloc_debug.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc_malloc_debug.abilist @@ -8,6 +8,8 @@ GLIBC_2.3 calloc F GLIBC_2.3 free F GLIBC_2.3 mallinfo F GLIBC_2.3 malloc F +GLIBC_2.3 malloc_get_state F +GLIBC_2.3 malloc_set_state F GLIBC_2.3 malloc_stats F GLIBC_2.3 malloc_trim F GLIBC_2.3 malloc_usable_size F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist index 47e5a5aa79..d566d675d0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist @@ -1412,9 +1412,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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc_malloc_debug.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc_malloc_debug.abilist index 65fb5036bd..c82c88dcf7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc_malloc_debug.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc_malloc_debug.abilist @@ -7,7 +7,9 @@ GLIBC_2.17 calloc F GLIBC_2.17 free 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 |