glibc/sysdeps
Siddhesh Poyarekar 0552fd2c7d 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>
2021-07-22 18:38:10 +05:30
..
aarch64 glibc.malloc.check: Wean away from malloc hooks 2021-07-22 18:38:08 +05:30
alpha nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
arc ARC: elf: make type safe 2021-07-21 13:13:45 -07:00
arm nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
csky Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
generic mtrace: Wean away from malloc hooks 2021-07-22 18:38:06 +05:30
gnu Add RFC 8335 Definitions from Linux 5.13 2021-06-29 15:38:27 -03:00
hppa nptl: Move pthread_spin_init, Move pthread_spin_unlock into libc 2021-04-23 17:06:44 +02:00
htl htl: Do not expose pthread hidden proto outside libpthread 2021-07-18 20:25:33 +00:00
hurd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
i386 mcheck: Align struct hdr to MALLOC_ALIGNMENT bytes [BZ #28068] 2021-07-12 18:13:32 -07:00
ia64 nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
ieee754 Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
m68k m68: Fix build after 9acda61d94 2021-04-06 15:10:31 -03:00
mach Move malloc_{g,s}et_state to libc_malloc_debug 2021-07-22 18:38:10 +05:30
microblaze Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
mips Update MIPS libm-test-ulps 2021-07-07 15:50:18 +00:00
nios2 Update Nios II libm-test-ulps. 2021-04-01 19:41:40 +00:00
nptl Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
posix posix: Add sysconf(_SC_{MIN,}SIGSTKSZ) support 2021-07-22 01:24:52 +02:00
powerpc Force building with -fno-common 2021-07-09 20:09:14 +02:00
pthread Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
riscv RISC-V: Update rv64 ULPs 2021-07-21 08:44:09 +02:00
s390 s390: Fix MEMCHR_Z900_G5 ifunc-variant if n>=0x80000000 [BZ #28024] 2021-07-01 16:46:59 +02:00
sh nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
sparc nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
unix Move malloc_{g,s}et_state to libc_malloc_debug 2021-07-22 18:38:10 +05:30
wordsize-32 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86 elf: Fix tst-cpu-features-cpuinfo on some AMD systems (BZ #28090) 2021-07-19 14:12:29 -03:00
x86_64 mtrace: Wean away from malloc hooks 2021-07-22 18:38:06 +05:30