aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2022-02-15 20:27:21 -0600
committerAndreas K. Hüttel <dilfridge@gentoo.org>2022-05-14 23:20:00 +0200
commit91ca927bb0c3a158130d491fd07fb5c157deb68e (patch)
tree72763ec7acb4153e50af250d88eb9e69ba29a4c6 /dlfcn/dlfcn.h
parentx86: Set .text section in memset-vec-unaligned-erms (diff)
downloadglibc-91ca927bb0c3a158130d491fd07fb5c157deb68e.tar.gz
glibc-91ca927bb0c3a158130d491fd07fb5c157deb68e.tar.bz2
glibc-91ca927bb0c3a158130d491fd07fb5c157deb68e.zip
x86: Fix bug in strncmp-evex and strncmp-avx2 [BZ #28895]
Logic can read before the start of `s1` / `s2` if both `s1` and `s2` are near the start of a page. To avoid having the result contimated by these comparisons the `strcmp` variants would mask off these comparisons. This was missing in the `strncmp` variants causing the bug. This commit adds the masking to `strncmp` so that out of range comparisons don't affect the result. test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass as well a full xcheck on x86_64 linux. Reviewed-by: H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit e108c02a5e23c8c88ce66d8705d4a24bb6b9a8bf) (cherry picked from commit 5373c90f2ea3c3fa9931a684c9b81c648dfbe8d7)
Diffstat (limited to 'dlfcn/dlfcn.h')
0 files changed, 0 insertions, 0 deletions