diff options
| author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-17 18:41:45 +0800 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-01-24 01:07:59 +0000 |
| commit | aef8f8d6a947b290162393e1d717c7aee96fef8e (patch) | |
| tree | a8ad58c2eb06a397629a3836fdce21eebda2ac56 /scripts/cpp | |
| parent | 7d4b6bcae91f29d7b4daf15bab06b66cf1d2217c (diff) | |
| download | glibc-aef8f8d6a947b290162393e1d717c7aee96fef8e.tar.xz glibc-aef8f8d6a947b290162393e1d717c7aee96fef8e.zip | |
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>
(cherry picked from commit f9493a15ea9cfb63a815c00c23142369ec09d8ce)
Diffstat (limited to 'scripts/cpp')
0 files changed, 0 insertions, 0 deletions
