]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]
authorNoah Goldstein <goldstein.w.n@gmail.com>
Tue, 15 Feb 2022 14:18:15 +0000 (08:18 -0600)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 19 Feb 2022 02:07:56 +0000 (18:07 -0800)
commite6251366b64960c271b39ec8d2afcc79e965e291
tree6137251d946fb000b8a8c6b4f8263b74ef94947d
parent0f8a2390000c4e9a152b5f6cf8220f2560c01e74
x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]

In the overflow fallback strncmp-avx2-rtm and wcsncmp-avx2-rtm would
call strcmp-avx2 and wcscmp-avx2 respectively. This would have
not checks around vzeroupper and would trigger spurious
aborts. This commit fixes that.

test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass on
AVX2 machines with and without RTM.

Co-authored-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit c6272098323153db373f2986c67786ea8c85f1cf)
sysdeps/x86/Makefile
sysdeps/x86/tst-strncmp-rtm.c
sysdeps/x86_64/multiarch/strcmp-avx2.S
sysdeps/x86_64/multiarch/strncmp-avx2-rtm.S
sysdeps/x86_64/multiarch/strncmp-avx2.S
sysdeps/x86_64/multiarch/wcsncmp-avx2-rtm.S
sysdeps/x86_64/multiarch/wcsncmp-avx2.S