Skip to content
Commit e108c02a authored by Noah Goldstein's avatar Noah Goldstein
Browse files

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: default avatarH.J. Lu <hjl.tools@gmail.com>
parent 0281c7a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment