]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Fix overflow bug with wmemchr-sse2 and wmemchr-avx2 [BZ #27974]
authorNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 9 Jun 2021 20:25:32 +0000 (16:25 -0400)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 27 Jan 2022 20:54:16 +0000 (12:54 -0800)
commit453ed0a0f262d0c410c82f4da1d25795347c73af
tree8b3a9ca6a6617ac3097697adbfb97a843a58a726
parente09c377806b5b0480a18a72087970b9a6fa3e08b
x86: Fix overflow bug with wmemchr-sse2 and wmemchr-avx2 [BZ #27974]

This commit fixes the bug mentioned in the previous commit.

The previous implementations of wmemchr in these files relied
on n * sizeof(wchar_t) which was not guranteed by the standard.

The new overflow tests added in the previous commit now
pass (As well as all the other tests).

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 645a158978f9520e74074e8c14047503be4db0f0)
sysdeps/x86_64/memchr.S
sysdeps/x86_64/multiarch/memchr-avx2.S