diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2024-07-11 11:28:53 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2024-07-16 10:35:27 +0200 |
commit | 5ad449c398a845a9c84808e4ac603beaa1006909 (patch) | |
tree | ebdf4d991425240ee6356a0039f8cfaddda41a4d /sysdeps/libm-ieee754/e_log10.c | |
parent | f80f3409e8b78b49b92dfdc22c08d6fa299d6920 (diff) | |
download | glibc-release/2.32/master.tar.gz glibc-release/2.32/master.tar.xz glibc-release/2.32/master.zip |
s390x: Fix segfault in wcsncmp [BZ #31934] release/2.32/master
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 9b7651410375ec8848a1944992d663d514db4ba7)
Diffstat (limited to 'sysdeps/libm-ieee754/e_log10.c')
0 files changed, 0 insertions, 0 deletions