aboutsummaryrefslogtreecommitdiff
path: root/malloc/tst-aligned-alloc.c
AgeCommit message (Collapse)AuthorFilesLines
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-1/+1
2024-12-10malloc: add indirection for malloc(-like) functions in tests [BZ #32366]Sam James1-0/+2
GCC 15 introduces allocation dead code removal (DCE) for PR117370 in r15-5255-g7828dc070510f8. This breaks various glibc tests which want to assert various properties of the allocator without doing anything obviously useful with the allocated memory. Alexander Monakov rightly pointed out that we can and should do better than passing -fno-malloc-dce to paper over the problem. Not least because GCC 14 already does such DCE where there's no testing of malloc's return value against NULL, and LLVM has such optimisations too. Handle this by providing malloc (and friends) wrappers with a volatile function pointer to obscure that we're calling malloc (et. al) from the compiler. Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
2024-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-1/+1
2023-05-08aligned_alloc: conform to C17DJ Delorie1-0/+80
This patch adds the strict checking for power-of-two alignments in aligned_alloc(), and updates the manual accordingly. Reviewed-by: Carlos O'Donell <carlos@redhat.com>