]> sourceware.org Git - 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)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 23 Jun 2021 18:13:03 +0000 (14:13 -0400)
commit645a158978f9520e74074e8c14047503be4db0f0
tree555f54e79a7195f522ffbcf11f240e7f40259ca3
parentda5a6fba0febbfc90896ce1b2eb75c6d8a88a72d
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>
sysdeps/x86_64/memchr.S
sysdeps/x86_64/multiarch/memchr-avx2.S
This page took 0.03964 seconds and 5 git commands to generate.