about summary refs log tree commit diff
path: root/NEWS
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-22 18:38:10 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-22 18:38:10 +0530
commit0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd (patch)
treebaf150b3e1b728c6c13b95116241a61bff5f21ab /NEWS
parentb5bd5bfe88f496463ec9fab680a8edf64d7c2a42 (diff)
downloadglibc-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 'NEWS')
-rw-r--r--NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index fa80c9685b..e26a9e2c17 100644
--- a/NEWS
+++ b/NEWS
@@ -138,6 +138,11 @@ Deprecated and removed features, and other changes affecting compatibility:
   features now need to preload a new debugging DSO libc_malloc_debug.so to get
   this functionality back.
 
+* The deprecated functions malloc_get_state and malloc_set_state have been
+  moved from the core C library into libc_malloc_debug.so.  Legacy applications
+  that still use these functions will now need to preload libc_malloc_debug.so
+  in their environment using the LD_PRELOAD environment variable.
+
 Changes to build and runtime requirements:
 
 * On Linux, the shm_open, sem_open, and related functions now expect the