glibc/sysdeps
Stefan Liebler 9b76514103 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>
2024-07-11 15:08:57 +02:00
..
aarch64 Aarch64: Add new memset for Qualcomm's oryon-1 core 2024-06-30 13:47:17 +02:00
alpha elf: Remove HWCAP_IMPORTANT 2024-06-18 10:45:36 +02:00
arc Convert to autoconf 2.72 (vanilla release, no distribution patches) 2024-06-17 21:15:28 +02:00
arm arm: Avoid UB in elf_machine_rel() 2024-06-26 12:45:43 +02:00
csky elf: Remove HWCAP_IMPORTANT 2024-06-18 10:45:36 +02:00
generic elf: Support recursive use of dynamic TLS in interposed malloc 2024-07-01 19:02:11 +02:00
gnu login: Use unsigned 32-bit types for seconds-since-epoch 2024-04-19 14:38:17 +02:00
hppa Update hppa libm-test-ulps 2024-06-23 13:51:25 -04:00
htl htl: Implement some support for TLS_DTV_AT_TP 2024-03-23 23:00:30 +01:00
hurd hurd: Move internal functions to internal header 2024-03-23 22:43:07 +01:00
i386 i386: Update ulps 2024-06-20 19:00:48 +02:00
ieee754 Convert to autoconf 2.72 (vanilla release, no distribution patches) 2024-06-17 21:15:28 +02:00
loongarch LoongArch: Fix tst-gnu2-tls2 test case 2024-06-26 12:02:07 +08:00
m68k math: Update m68k ULPs 2024-07-08 21:51:03 +02:00
mach Convert to autoconf 2.72 (vanilla release, no distribution patches) 2024-06-17 21:15:28 +02:00
microblaze Implement C23 logp1 2024-06-17 13:47:09 +00:00
mips MIPSr6/math: Use builtin fma and fmaf 2024-07-01 14:52:30 -03:00
nios2 Convert to autoconf 2.72 (vanilla release, no distribution patches) 2024-06-17 21:15:28 +02:00
nptl Linux: Make __rseq_size useful for feature detection (bug 31965) 2024-07-09 19:33:37 +02:00
or1k Implement C23 logp1 2024-06-17 13:47:09 +00:00
posix posix: Sync tempname with gnulib 2024-04-10 14:53:39 -03:00
powerpc powerpc: Update ulps 2024-06-20 12:15:31 +02:00
pthread Add crt1-2.0.o for glibc 2.0 compatibility tests 2024-05-06 07:49:40 -07:00
riscv riscv: Update nofpu libm test ulps 2024-07-03 21:05:34 +02:00
s390 s390x: Fix segfault in wcsncmp [BZ #31934] 2024-07-11 15:08:57 +02:00
sh Implement C23 logp1 2024-06-17 13:47:09 +00:00
sparc sparc: Regenerate ULPs 2024-06-19 14:58:32 +02:00
unix Linux: Make __rseq_size useful for feature detection (bug 31965) 2024-07-09 19:33:37 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 x86: Set default non_temporal_threshold for Zhaoxin processors 2024-06-30 06:26:43 -07:00
x86_64 elf: Support recursive use of dynamic TLS in interposed malloc 2024-07-01 19:02:11 +02:00