glibc/malloc
H.J. Lu f9493a15ea Hide all malloc functions from compiler [BZ #32366]
Since -1 isn't a power of two, compiler may reject it, hide memalign from
Clang 19 which issues an error:

tst-memalign.c:86:31: error: requested alignment is not a power of 2 [-Werror,-Wnon-power-of-two-alignment]
   86 |   p = memalign (-1, pagesize);
      |                 ^~
tst-memalign.c:86:31: error: requested alignment must be 4294967296 bytes or smaller; maximum alignment assumed [-Werror,-Wbuiltin-assume-aligned-alignment]
   86 |   p = memalign (-1, pagesize);
      |                 ^~

Update tst-malloc-aux.h to hide all malloc functions and include it in
all malloc tests to prevent compiler from optimizing out any malloc
functions.

Tested with Clang 19.1.5 and GCC 15 20241206 for BZ #32366.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-17 20:51:08 +08:00
..
alloc_buffer_alloc_array.c
alloc_buffer_allocate.c
alloc_buffer_copy_bytes.c
alloc_buffer_copy_string.c
alloc_buffer_create_failure.c
arena.c Silence most -Wzero-as-null-pointer-constant diagnostics 2024-11-25 16:45:59 -03:00
Depend
dynarray_at_failure.c
dynarray_emplace_enlarge.c
dynarray_finalize.c
dynarray_resize_clear.c
dynarray_resize.c
dynarray-skeleton.c
dynarray.h
hooks.c
Makefile malloc: Link threading tests with $(shared-thread-library) 2024-08-20 16:16:25 +02:00
malloc-check.c Silence most -Wzero-as-null-pointer-constant diagnostics 2024-11-25 16:45:59 -03:00
malloc-debug.c
malloc-internal.h malloc: Optimize small memory clearing for calloc 2024-12-04 04:28:15 +08:00
malloc.c malloc: Add tcache path for calloc 2024-12-11 11:34:47 +08:00
malloc.h
mallocbug.c
mcheck-impl.c
mcheck-init.c
mcheck.c
mcheck.h
memusage.c
memusage.sh
memusagestat.c
morecore.c
mtrace-impl.c
mtrace.c
mtrace.pl
obstack.c Silence most -Wzero-as-null-pointer-constant diagnostics 2024-11-25 16:45:59 -03:00
obstack.h
reallocarray.c Silence most -Wzero-as-null-pointer-constant diagnostics 2024-11-25 16:45:59 -03:00
scratch_buffer_grow_preserve.c
scratch_buffer_grow.c
scratch_buffer_set_array_size.c
set-freeres.c
thread-freeres.c
tst-aligned_alloc-lib.c
tst-aligned-alloc-random-thread-cross.c malloc: add multi-threaded tests for aligned_alloc/calloc/malloc 2024-07-22 11:54:46 +02:00
tst-aligned-alloc-random-thread.c malloc: add multi-threaded tests for aligned_alloc/calloc/malloc 2024-07-22 11:54:46 +02:00
tst-aligned-alloc-random.c
tst-aligned-alloc-static.c
tst-aligned-alloc.c malloc: add indirection for malloc(-like) functions in tests [BZ #32366] 2024-12-10 01:50:56 +00:00
tst-alloc_buffer.c
tst-calloc.c
tst-compathooks-off.c malloc: add indirection for malloc(-like) functions in tests [BZ #32366] 2024-12-10 01:50:56 +00:00
tst-compathooks-on.c
tst-dynarray-at-fail.c
tst-dynarray-fail.c
tst-dynarray-shared.h
tst-dynarray.c
tst-free-errno.c
tst-interpose-aux-nothread.c
tst-interpose-aux-thread.c
tst-interpose-aux.c
tst-interpose-aux.h
tst-interpose-nothread.c
tst-interpose-skeleton.c
tst-interpose-static-nothread.c
tst-interpose-static-thread.c
tst-interpose-thread.c
tst-mallinfo2.c Hide all malloc functions from compiler [BZ #32366] 2024-12-17 20:51:08 +08:00
tst-malloc_info.c
tst-malloc-alternate-path.c
tst-malloc-aux.h Hide all malloc functions from compiler [BZ #32366] 2024-12-17 20:51:08 +08:00
tst-malloc-backtrace.c Hide all malloc functions from compiler [BZ #32366] 2024-12-17 20:51:08 +08:00
tst-malloc-check.c malloc: add indirection for malloc(-like) functions in tests [BZ #32366] 2024-12-10 01:50:56 +00:00
tst-malloc-fork-deadlock.c
tst-malloc-random.c
tst-malloc-stats-cancellation.c
tst-malloc-tcache-leak.c
tst-malloc-thread-exit.c
tst-malloc-thread-fail.c
tst-malloc-too-large.c malloc: add indirection for malloc(-like) functions in tests [BZ #32366] 2024-12-10 01:50:56 +00:00
tst-malloc-usable-tunables.c
tst-malloc-usable.c
tst-malloc.c malloc: add indirection for malloc(-like) functions in tests [BZ #32366] 2024-12-10 01:50:56 +00:00
tst-mallocalign1.c
tst-mallocfork2.c
tst-mallocfork3.c
tst-mallocfork.c
tst-mallocstate.c
tst-mallopt.c
tst-memalign-2.c
tst-memalign-3.c
tst-memalign.c Hide all malloc functions from compiler [BZ #32366] 2024-12-17 20:51:08 +08:00
tst-mtrace.c
tst-mtrace.sh
tst-mxfast.c
tst-obstack.c
tst-posix_memalign.c
tst-pvalloc-fortify.c
tst-pvalloc.c
tst-realloc.c malloc: add indirection for malloc(-like) functions in tests [BZ #32366] 2024-12-10 01:50:56 +00:00
tst-reallocarray.c
tst-safe-linking.c Hide all malloc functions from compiler [BZ #32366] 2024-12-17 20:51:08 +08:00
tst-scratch_buffer.c
tst-tcfree1.c
tst-tcfree2.c
tst-tcfree3.c
tst-trim1.c
tst-valloc.c Hide all malloc functions from compiler [BZ #32366] 2024-12-17 20:51:08 +08:00
Versions