From c142eb253f3814f46527e9b37484041dd85702cf Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 22 Jul 2021 18:38:02 +0530 Subject: mcheck: Wean away from malloc hooks [BZ #23489] Split the mcheck implementation into the debugging hooks and API so that the API can be replicated in libc and libc_malloc_debug.so. The libc APIs always result in failure. The mcheck implementation has also been moved entirely into libc_malloc_debug.so and with it, all of the hook initialization code can now be moved into the debug library. Now the initialization can be done independently of libc internals. With this patch, libc_malloc_debug.so can no longer be used with older libcs, which is not its goal anyway. tst-vfork3 breaks due to this since it spawns shell scripts, which in turn execute using the system glibc. Move the test to tests-container so that only the built glibc is used. This move also fixes bugs in the mcheck version of memalign and realloc, thus allowing removal of the tests from tests-mcheck exclusion list. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/microblaze/le/libc_malloc_debug.abilist | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sysdeps/unix/sysv/linux/microblaze/le') diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc_malloc_debug.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc_malloc_debug.abilist index d02da8ef66..0502f3001e 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc_malloc_debug.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc_malloc_debug.abilist @@ -1,8 +1,16 @@ +GLIBC_2.18 __free_hook D 0x4 +GLIBC_2.18 __malloc_hook D 0x4 +GLIBC_2.18 __memalign_hook D 0x4 +GLIBC_2.18 __realloc_hook D 0x4 GLIBC_2.18 aligned_alloc F GLIBC_2.18 calloc F GLIBC_2.18 free F GLIBC_2.18 malloc F +GLIBC_2.18 mcheck F +GLIBC_2.18 mcheck_check_all F +GLIBC_2.18 mcheck_pedantic F GLIBC_2.18 memalign F +GLIBC_2.18 mprobe F GLIBC_2.18 posix_memalign F GLIBC_2.18 pvalloc F GLIBC_2.18 realloc F -- cgit 1.4.1