about summary refs log tree commit diff
path: root/malloc/malloc-check.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-23 13:57:56 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-23 13:57:56 +0530
commit5b8d271571434a74b2464c278eafe2ff81f31029 (patch)
treef26246c5541976c4c40740c801f7d42c02b68d44 /malloc/malloc-check.c
parent9a7ab0769b295cbf5232140401742a8f34bda3de (diff)
downloadglibc-5b8d271571434a74b2464c278eafe2ff81f31029.tar.gz
glibc-5b8d271571434a74b2464c278eafe2ff81f31029.tar.xz
glibc-5b8d271571434a74b2464c278eafe2ff81f31029.zip
Fix build and tests with --disable-tunables
Remove unused code and declare __libc_mallopt when !IS_IN (libc) to
allow the debug hook to build with --disable-tunables.

Also, run tst-ifunc-isa-2* tests only when tunables are enabled since
the result depends on it.

Tested on x86_64.

Reported-by: Matheus Castanho <msc@linux.ibm.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'malloc/malloc-check.c')
-rw-r--r--malloc/malloc-check.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/malloc/malloc-check.c b/malloc/malloc-check.c
index a444c7478e..8ed67de3ff 100644
--- a/malloc/malloc-check.c
+++ b/malloc/malloc-check.c
@@ -376,6 +376,7 @@ memalign_check (size_t alignment, size_t bytes)
   return mem2mem_check (tag_new_usable (mem), bytes);
 }
 
+#if HAVE_TUNABLES
 static void
 TUNABLE_CALLBACK (set_mallopt_check) (tunable_val_t *valp)
 {
@@ -383,6 +384,7 @@ TUNABLE_CALLBACK (set_mallopt_check) (tunable_val_t *valp)
   if (value != 0)
     __malloc_debug_enable (MALLOC_CHECK_HOOK);
 }
+#endif
 
 static bool
 initialize_malloc_check (void)