Go to file
Stefan Liebler 5f08d1df2c s390x: Fix segfault in wcsncmp [BZ #31934]
The z13/vector-optimized wcsncmp implementation segfaults if n=1
and there is only one character (equal on both strings) before
the page end.  Then it loads and compares one character and misses
to check n again.  The following load fails.

This patch removes the extra load and compare of the first character
and just start with the loop which uses vector-load-to-block-boundary.
This code-path also checks n.

With this patch both tests are passing:
- the simplified one mentioned in the bugzilla 31934
- the full one in Florian Weimer's patch:
"manual: Document a GNU extension for strncmp/wcsncmp"
(https://patchwork.sourceware.org/project/glibc/patch/874j9eml6y.fsf@oldenburg.str.redhat.com/):
On s390x-linux-gnu (z16), the new wcsncmp test fails due to bug 31934.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>

(cherry picked from commit 9b76514103)
2024-07-16 10:34:50 +02:00
argp Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
assert Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
benchtests benchtests: Do not build bench-timing-type with MODULE_NAME=libc 2021-01-26 18:14:19 +01:00
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
catgets Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
ChangeLog.old Prepare for glibc 2.33 release 2021-02-01 14:15:33 -03:00
conform Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
crypt Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
csu csu: Move static pie self relocation later [BZ #27072] 2021-01-21 15:55:10 +00:00
ctype Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
debug debug: Mark libSegFault.so as NODELETE 2023-07-21 16:39:46 +02:00
dirent Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dlfcn dlfcn: Failures after dlmopen should not terminate process [BZ #15271] 2021-06-09 17:15:00 +02:00
elf elf: Disable some subtests of ifuncmain1, ifuncmain5 for !PIE 2024-05-09 16:47:01 -07:00
gmon Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gnulib Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
grp Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gshadow Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hesiod Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
htl Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hurd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
iconv Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
iconvdata iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961) 2024-04-17 14:03:53 -03:00
include <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC 2022-01-18 10:16:55 +01:00
inet Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
intl Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
io io: Return EBAFD for negative file descriptor on fstat (BZ #27559) 2021-03-11 10:53:50 -03:00
libio Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locale Update automatically-generated copyright dates 2021-01-02 12:17:34 -08:00
localedata POSIX locale: Fix typo in comment 2021-01-09 12:14:44 +01:00
login Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
mach Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
malloc malloc: Fix a realloc crash with heap tagging [BZ 27468] 2021-03-29 09:45:10 +01:00
manual x86: Add bounds x86_non_temporal_threshold 2022-07-18 22:13:57 -07:00
math math/test-tgmath2: Fix fabs failure when no long double 2021-01-15 11:24:04 +09:00
mathvec Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
misc linux: always update select timeout (BZ #27706) 2021-04-13 10:15:35 -03:00
nis Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nptl nptl: Add backoff mechanism to spinlock loop 2022-09-28 15:36:46 -07:00
nptl_db nptl_db: Support different libpthread/ld.so load orders (bug 27744) 2021-04-30 08:32:03 +02:00
nscd nscd: Use time_t for return type of addgetnetgrentX 2024-05-03 09:22:44 +02:00
nss Fix failing nss/tst-nss-files-hosts-long with local resolver 2021-09-14 21:03:05 +02:00
po Update translations 2021-02-01 14:15:16 -03:00
posix posix: Fix attribute access mode on getcwd [BZ #27476] 2021-09-19 18:47:28 +02:00
pwd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
resolv Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
resource Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rt librt: add test (bug 28213) 2021-08-17 18:47:03 +05:30
scripts elf: Avoid RELATIVE relocs in __tunables_init 2021-01-21 14:05:15 +00:00
setjmp Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
shadow Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
signal Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
socket socket: Do not use AF_NETLINK in __opensock 2022-02-03 20:04:32 +01:00
soft-fp Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stdio-common Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stdlib realpath: Avoid overwriting preexisting error (CVE-2021-3998) 2022-01-24 17:30:16 +01:00
string x86: Fix wcsnlen-avx2 page cross length comparison [BZ #29591] 2022-11-24 15:12:44 -08:00
sunrpc CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) 2022-01-18 10:17:11 +01:00
support support: Fix xclone build failures on ia64 and hppa 2022-01-26 18:50:39 +01:00
sysdeps s390x: Fix segfault in wcsncmp [BZ #31934] 2024-07-16 10:34:50 +02:00
sysvipc Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
termios Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
time Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
timezone Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wcsmbs Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wctype Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
.gitattributes Assume __NR_openat is always defined 2016-03-23 23:35:08 +01:00
.gitignore Add *.pyc to .gitignore 2015-05-18 15:26:26 +05:30
abi-tags Remove the bulk of the NaCl port. 2017-05-20 08:09:10 -04:00
aclocal.m4 LIBC_SLIBDIR_RTLDDIR: substitute arguments in single quotes 2018-01-25 17:20:28 +01:00
config.h.in x86: Set minimum x86-64 level marker [BZ #27318] 2021-03-06 07:54:09 -08:00
config.make.in install: Replace scripts/output-format.sed with objdump -f [BZ #26559] 2021-01-11 12:03:36 -08:00
configure configure: Check for static PIE support 2021-01-21 15:54:50 +00:00
configure.ac configure: Check for static PIE support 2021-01-21 15:54:50 +00:00
COPYING
COPYING.LIB
extra-lib.mk Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
gen-locales.mk Improve gen-locales.mk and gen-locale.sh to make test files with @ options work 2018-02-27 17:01:57 +01:00
INSTALL Update INSTALL with package versions that are known to work 2021-01-25 13:13:17 -03:00
libc-abis riscv: support GNU indirect function 2021-01-10 21:25:13 -05:00
libof-iterator.mk Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
LICENSES Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
MAINTAINERS Add MAINTAINERS 2017-05-11 13:38:30 -04:00
Makeconfig Force DT_RPATH for --enable-hardcoded-path-in-tests 2024-05-10 05:46:28 -07:00
Makefile Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile.help Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile.in New make target to only build benchmark binaries 2016-04-20 10:23:28 +05:30
Makerules Makerules: Do not require startup files for format.lds probe object 2021-01-12 12:22:47 +01:00
NEWS Document BZ #20975 fix 2023-05-23 16:47:45 -07:00
o-iterator.mk
README Documentation for the RISC-V 32-bit port 2020-08-27 08:17:44 -07:00
Rules Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
shlib-versions Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
test-skeleton.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
version.h Prepare for glibc 2.33 release 2021-02-01 14:15:33 -03:00

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arc*-*-linux-gnu
	arm-*-linux-gnueabi
	csky-*-linux-gnuabiv2
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv32-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see https://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at https://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.