about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-22 18:38:02 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-22 18:38:02 +0530
commitc142eb253f3814f46527e9b37484041dd85702cf (patch)
treeee11b3299370d97ca570aecebdae9f1f54debaaf /sysdeps/unix/sysv/linux/powerpc
parent2d2d9f2b48a943fa556301db532103d09800da4d (diff)
downloadglibc-c142eb253f3814f46527e9b37484041dd85702cf.tar.gz
glibc-c142eb253f3814f46527e9b37484041dd85702cf.tar.xz
glibc-c142eb253f3814f46527e9b37484041dd85702cf.zip
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 <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc_malloc_debug.abilist8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc_malloc_debug.abilist8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc_malloc_debug.abilist8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc_malloc_debug.abilist8
4 files changed, 32 insertions, 0 deletions
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 7621d1266e..c847b1ee49 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
@@ -1,9 +1,17 @@
+GLIBC_2.0 __free_hook D 0x4
+GLIBC_2.0 __malloc_hook D 0x4
+GLIBC_2.0 __memalign_hook D 0x4
+GLIBC_2.0 __realloc_hook D 0x4
 GLIBC_2.0 calloc F
 GLIBC_2.0 free F
 GLIBC_2.0 malloc F
+GLIBC_2.0 mcheck F
 GLIBC_2.0 memalign F
+GLIBC_2.0 mprobe F
 GLIBC_2.0 pvalloc F
 GLIBC_2.0 realloc F
 GLIBC_2.0 valloc F
 GLIBC_2.16 aligned_alloc F
+GLIBC_2.2 mcheck_check_all F
+GLIBC_2.2 mcheck_pedantic F
 GLIBC_2.2 posix_memalign 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 7621d1266e..c847b1ee49 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
@@ -1,9 +1,17 @@
+GLIBC_2.0 __free_hook D 0x4
+GLIBC_2.0 __malloc_hook D 0x4
+GLIBC_2.0 __memalign_hook D 0x4
+GLIBC_2.0 __realloc_hook D 0x4
 GLIBC_2.0 calloc F
 GLIBC_2.0 free F
 GLIBC_2.0 malloc F
+GLIBC_2.0 mcheck F
 GLIBC_2.0 memalign F
+GLIBC_2.0 mprobe F
 GLIBC_2.0 pvalloc F
 GLIBC_2.0 realloc F
 GLIBC_2.0 valloc F
 GLIBC_2.16 aligned_alloc F
+GLIBC_2.2 mcheck_check_all F
+GLIBC_2.2 mcheck_pedantic F
 GLIBC_2.2 posix_memalign 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 921079580c..0696d526d4 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
@@ -1,8 +1,16 @@
 GLIBC_2.16 aligned_alloc F
+GLIBC_2.3 __free_hook D 0x8
+GLIBC_2.3 __malloc_hook D 0x8
+GLIBC_2.3 __memalign_hook D 0x8
+GLIBC_2.3 __realloc_hook D 0x8
 GLIBC_2.3 calloc F
 GLIBC_2.3 free F
 GLIBC_2.3 malloc F
+GLIBC_2.3 mcheck F
+GLIBC_2.3 mcheck_check_all F
+GLIBC_2.3 mcheck_pedantic F
 GLIBC_2.3 memalign F
+GLIBC_2.3 mprobe F
 GLIBC_2.3 posix_memalign F
 GLIBC_2.3 pvalloc F
 GLIBC_2.3 realloc 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 2b183c90d4..cc6531b017 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
@@ -1,8 +1,16 @@
+GLIBC_2.17 __free_hook D 0x8
+GLIBC_2.17 __malloc_hook D 0x8
+GLIBC_2.17 __memalign_hook D 0x8
+GLIBC_2.17 __realloc_hook D 0x8
 GLIBC_2.17 aligned_alloc F
 GLIBC_2.17 calloc F
 GLIBC_2.17 free F
 GLIBC_2.17 malloc F
+GLIBC_2.17 mcheck F
+GLIBC_2.17 mcheck_check_all F
+GLIBC_2.17 mcheck_pedantic F
 GLIBC_2.17 memalign F
+GLIBC_2.17 mprobe F
 GLIBC_2.17 posix_memalign F
 GLIBC_2.17 pvalloc F
 GLIBC_2.17 realloc F