1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00
freebsd/lib
Robert Clausecker c91cd7d03a lib/libc/amd64/string/strcspn.S: always return earliest match in 17--32 char case
When matching against a set of 17--32 characters, strcspn() uses two
invocations of PCMPISTRI to match against the first 16 characters
of the set and then the remaining characters.  If a match was found in
the first half of the set, the code originally immediately returned
that match.  However, it is possible for a match in the second half of
the set to occur earlier in the vector, leading to that match being
overlooked.

Fix the code by checking if there is a match in the second half of the
set and taking the earlier of the two matches.

The correctness of the function has been verified with extended unit
tests and test runs against the glibc test suite.

Approved by:	mjg (implicit, via IRC)
MFC after:	1 week
MFC to:		stable/14
2023-12-21 03:17:17 +01:00
..
atf
clang
csu
flua
geom
googletest
lib9p
lib80211
libalias
libarchive
libauditd
libbe
libbearssl
libbegemot
libblacklist
libblocksruntime
libbluetooth
libbsddialog
libbsdstat
libbsm
libbsnmp
libbz2
libc
libc_nonshared
libc++
libc++experimental
libcalendar
libcam
libcapsicum
libcasper
libcbor
libclang_rt
libcom_err
libcompat
libcompiler_rt
libcrypt
libcuse
libcxxrt
libdevctl
libdevdctl
libdevinfo
libdevstat
libdl
libdpv
libdwarf
libedit
libefivar
libelf
libelftc
libevent1
libexecinfo
libexpat
libfetch
libfido2
libfigpar
libgcc_eh
libgcc_s
libgeom
libgpio
libgssapi
libiconv_modules
libifconfig
libipsec
libipt
libiscsiutil
libjail
libkiconv
libkvm
libldns
liblua
liblutok
liblzma
libmagic
libmd
libmemstat
libmilter
libmixer
libmp
libmt
libnetbsd
libnetgraph
libnetmap
libnv
libomp
libopenbsd
libopencsd
libpam
libpathconv
libpcap
libpe
libpfctl
libpjdlog
libpmc
libpmcstat
libproc
libprocstat
libradius
libregex
librpcsec_gss
librpcsvc
librss
librt
librtld_db
libsbuf
libsdp
libsecureboot
libsm
libsmb
libsmdb
libsmutil
libsqlite3
libssp
libssp_nonshared
libstats
libstdbuf
libstdthreads
libsysdecode
libtacplus
libtelnet
libthr
libthread_db
libucl
libufs
libugidfw
libulog
libunbound
libusb
libusbhid
libutil
libveriexec
libvgl
libvmmapi
libwrap
libxo
liby
libypclnt
libz
libzstd
msun
ncurses
nss_tacplus
ofed
tests
Makefile
Makefile.inc