about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/strcmp-avx2.S
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2022-02-15 08:18:15 -0600
committerH.J. Lu <hjl.tools@gmail.com>2022-02-18 18:16:58 -0800
commita3ef8a0c3d81ac9e480512137d4eb880cb875a6a (patch)
treec8ddcf6b49086155d7112d4f331491a8e8edaff9 /sysdeps/x86_64/multiarch/strcmp-avx2.S
parent70522b1c1d1ffa5e3bd55aa3c064ea93a330bde9 (diff)
downloadglibc-a3ef8a0c3d81ac9e480512137d4eb880cb875a6a.tar.gz
glibc-a3ef8a0c3d81ac9e480512137d4eb880cb875a6a.tar.xz
glibc-a3ef8a0c3d81ac9e480512137d4eb880cb875a6a.zip
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)
Diffstat (limited to 'sysdeps/x86_64/multiarch/strcmp-avx2.S')
-rw-r--r--sysdeps/x86_64/multiarch/strcmp-avx2.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S
index f199c91f7f..5c41ba678a 100644
--- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
+++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
@@ -95,7 +95,7 @@ ENTRY (STRCMP)
 	   length to bound a valid memory region. In these cases just use
 	   'wcscmp'.  */
 	shrq	$56, %rcx
-	jnz	__wcscmp_avx2
+	jnz	OVERFLOW_STRCMP
 #  endif
 	/* Convert units: from wide to byte char.  */
 	shl	$2, %RDX_LP