]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: tst-audit10: split AVX512F code into dedicated functions [BZ #32882]
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 19 Apr 2025 18:45:07 +0000 (20:45 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 22 Apr 2025 21:39:59 +0000 (23:39 +0200)
commite78caeb4ff812ae19d24d65f4d4d48508154277b
tree93f383fac56bce4a5346038d7deca4969efd34ba
parent4e24e4d936b57f6e7809032f55cc95a4cf4d2396
elf: tst-audit10: split AVX512F code into dedicated functions [BZ #32882]

"Recent" GCC versions (since commit fc62716fe8d1, backported to stable
branches) emit a vzeroupper instruction at the end of functions
containing AVX instructions. This causes the tst-audit10 test to fail
on CPUs lacking AVX instructions, despite the AVX512F check. The crash
occurs in the pltenter function of tst-auditmod10b.c.

Fix that by moving the code guarded by the check_avx512 function into
specific functions using the target ("avx512f") attribute. Note that
since commit 5359c3bc91cc ("x86-64: Remove compiler -mavx512f check") it
is safe to assume that the compiler has AVX512F support, thus the
__AVX512F__ checks can be dropped.

Tested on non-AVX, AVX2 and AVX512F machines.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
sysdeps/x86_64/Makefile
sysdeps/x86_64/tst-auditmod10b.c