glibc/sysdeps
Stefan Liebler 87fa7bfb84 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:09 +02:00
..
aarch64 AArch64: Check kernel version for SVE ifuncs 2024-04-09 18:02:26 +01:00
alpha elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
arc login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 22:04:32 +02:00
arm login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
csky login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
generic login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 22:04:32 +02:00
gnu hurd: Fix glob lstat compatibility 2021-07-22 20:31:52 +02:00
hppa login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 22:04:32 +02:00
htl htl: Do not expose pthread hidden proto outside libpthread 2021-07-18 20:25:33 +00:00
hurd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
i386 i386: Regenerate ulps 2022-04-27 21:20:43 -04:00
ia64 elf: Issue la_symbind for bind-now (BZ #23734) 2022-04-12 13:32:59 -04:00
ieee754 s_sincosf.h: Change pio4 type to float [BZ #28713] 2023-01-11 15:29:37 +01:00
m68k login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
mach malloc: Use __get_nprocs on arena_get2 (BZ 30945) 2024-02-12 10:20:44 -03:00
microblaze login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
mips login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
nios2 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
nptl nptl: Add backoff mechanism to spinlock loop 2022-09-28 07:34:53 -07:00
posix Fix leak in getaddrinfo introduced by the fix for CVE-2023-4806 [BZ #30843] 2023-09-26 15:38:49 -04:00
powerpc login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
pthread nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214) 2022-06-08 17:15:08 -03:00
riscv login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 22:04:32 +02:00
s390 s390x: Fix segfault in wcsncmp [BZ #31934] 2024-07-16 10:34:09 +02:00
sh login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
sparc login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
unix login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 22:04:35 +02:00
x86_64 x86_64: Optimize ffsll function code size. 2024-01-31 18:54:26 -08:00