Go to file
Stefan Liebler 5ad449c398 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:35:27 +02:00
argp
assert
benchtests benchtests/README update. 2020-08-04 12:44:41 -04:00
bits signal: Move sys_errlist to a compat symbol 2020-07-07 14:10:58 -03:00
catgets
ChangeLog.old Prepare for glibc 2.32 release. 2020-08-04 22:17:00 -04:00
conform
crypt
csu Linux: Remove rseq support 2020-07-16 17:55:35 +02:00
ctype
debug debug: Mark libSegFault.so as NODELETE 2023-07-21 16:40:14 +02:00
dirent
dlfcn
elf elf: Disable some subtests of ifuncmain1, ifuncmain5 for !PIE 2024-05-09 16:48:32 -07:00
gmon
gnulib
grp grp: Implement fgetgrent_r using __nss_fgetent_r 2020-07-21 07:34:15 +02:00
gshadow shadow: Implement fgetspent_r using __nss_fgetent_r 2020-07-21 07:34:43 +02:00
hesiod
htl Add the __libc_single_threaded variable 2020-07-06 11:15:58 +02:00
hurd hurd: Add remaining cancelation points 2020-06-28 22:46:21 +00:00
iconv iconv: Fix incorrect UCS4 inner loop bounds (BZ#26923) 2022-10-04 08:00:00 +00:00
iconvdata iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961) 2024-04-17 14:03:30 -03:00
include <shlib-compat.h>: Support compat_symbol_reference for _ISOMAC 2022-10-04 08:00:00 +00:00
inet Move <rpc/netdb.h> from sunrpc to inet 2020-07-17 15:19:35 +02:00
intl intl: Handle translation output codesets with suffixes [BZ #26383] 2020-09-25 14:57:32 +02:00
io
libio libio: Remove __libc_readline_unlocked 2020-07-21 07:34:50 +02:00
locale locale: Add transliteration for Geresh, Gershayim (U+05F3, U+05F4) 2020-05-15 10:38:10 +02:00
localedata en_US: Minimize changes to date_fmt (Bug 25923) 2020-07-16 17:17:10 -04:00
login y2038: Replace __clock_gettime with __clock_gettime64 2020-05-20 16:45:16 +02:00
mach
malloc tests-mcheck: New variable to run tests with MALLOC_CHECK_=3 2020-12-24 11:20:15 +05:30
manual Reversing calculation of __x86_shared_non_temporal_threshold 2020-10-28 11:44:02 +01:00
math Use C2x return value from getpayload of non-NaN (bug 26073). 2020-07-06 16:18:02 +00:00
mathvec
misc Remove __warndecl 2020-11-10 20:01:01 +05:30
nis Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
nptl nptl: Do not set signal mask on second setjmp return [BZ #28607] 2021-11-24 10:31:02 +01:00
nptl_db
nscd nscd: Use time_t for return type of addgetnetgrentX 2024-05-03 09:25:14 +02:00
nss Fix failing nss/tst-nss-files-hosts-long with local resolver 2021-09-14 21:05:19 +02:00
po Update translations. 2020-08-04 20:31:51 -04:00
posix posix: Fix attribute access mode on getcwd [BZ #27476] 2021-09-19 18:48:29 +02:00
pwd pwd: Implement fgetpwent_r using __nss_fgetent_r 2020-07-21 07:34:34 +02:00
resolv resolv: Serialize processing in resolv/tst-resolv-txnid-collision 2020-11-10 16:59:42 +01:00
resource
rt librt: add test (bug 28213) 2021-08-17 19:02:46 +05:30
scripts Use binutils 2.35 branch in build-many-glibcs.py. 2020-07-27 14:55:10 +00:00
setjmp
shadow shadow: Implement fgetspent_r using __nss_fgetent_r 2020-07-21 07:34:43 +02:00
signal signal: Move sys_siglist to a compat symbol 2020-07-07 14:10:58 -03:00
socket socket: Add the __sockaddr_un_set function 2022-10-04 08:00:00 +00:00
soft-fp
stdio-common __vfscanf_internal: fix aliasing violation (bug 26690) 2021-01-21 13:29:30 +00:00
stdlib support: Add capability to fork an sgid child 2021-04-14 10:37:23 +05:30
string x86: Fix wcsnlen-avx2 page cross length comparison [BZ #29591] 2022-11-24 16:28:58 -08:00
sunrpc CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) 2022-10-04 08:00:00 +00:00
support support: Add xpthread_kill 2021-11-24 10:27:51 +01:00
sysdeps s390x: Fix segfault in wcsncmp [BZ #31934] 2024-07-16 10:35:27 +02:00
sysvipc sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637] 2020-10-15 10:11:01 -03:00
termios
time Fix time/tst-cpuclock1 intermitent failures 2020-07-10 19:41:06 -03:00
timezone Update timezone code from tzcode 2020a 2020-05-15 09:19:27 -07:00
wcsmbs mbstowcs: Document, test, and fix null pointer dst semantics (Bug 25219) 2020-06-01 12:26:32 -04:00
wctype
.gitattributes
.gitignore
abi-tags
aclocal.m4
config.h.in Remove --enable-obsolete-rpc configure flag 2020-07-13 19:36:35 +02:00
config.make.in Remove --enable-obsolete-rpc configure flag 2020-07-13 19:36:35 +02:00
configure Remove --enable-obsolete-rpc configure flag 2020-07-13 19:36:35 +02:00
configure.ac Remove --enable-obsolete-rpc configure flag 2020-07-13 19:36:35 +02:00
COPYING
COPYING.LIB
extra-lib.mk
gen-locales.mk
INSTALL Regenerate INSTALL for ARC port updates. 2020-07-22 23:32:07 -04:00
libc-abis
libof-iterator.mk
LICENSES
MAINTAINERS
Makeconfig Force DT_RPATH for --enable-hardcoded-path-in-tests 2024-05-10 05:46:54 -07:00
Makefile
Makefile.help
Makefile.in
Makerules Don't mix linker error messages into edited scripts 2020-08-04 19:52:56 -04:00
NEWS CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) 2022-10-04 08:00:00 +00:00
o-iterator.mk
README Documentation for ARC port 2020-07-10 16:31:58 -07:00
Rules tests-mcheck: New variable to run tests with MALLOC_CHECK_=3 2020-12-24 11:20:15 +05:30
shlib-versions Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
test-skeleton.c
version.h Set version.h RELEASE to "stable" (Bug 26700) 2020-10-02 15:34:21 -04: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
	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.