glibc/glibc-upstream-2.34-111.patch
Florian Weimer abcc04a5bf Sync with upstream branch release/2.34/master
Upstream commit: 224d8c1890b6c57c7e4e8ddbb792dd9552086704

- debug: Synchronize feature guards in fortified functions [BZ #28746]
- debug: Autogenerate _FORTIFY_SOURCE tests
- Enable _FORTIFY_SOURCE=3 for gcc 12 and above
- fortify: Fix spurious warning with realpath
- __glibc_unsafe_len: Fix comment
- debug: Add tests for _FORTIFY_SOURCE=3
- Make sure that the fortified function conditionals are constant
- Don't add access size hints to fortifiable functions
- nss: Protect against errno changes in function lookup (bug 28953)
- nss: Do not mention NSS test modules in <gnu/lib-names.h>
- io: Add fsync call in tst-stat
- hppa: Fix warnings from _dl_lookup_address
- nptl: Fix cleanups for stack grows up [BZ# 28899]
- hppa: Revise gettext trampoline design
- hppa: Fix swapcontext
- Fix elf/tst-audit2 on hppa
- localedef: Handle symbolic links when generating locale-archive
- NEWS: Add a bug fix entry for BZ #28896
- x86: Fix TEST_NAME to make it a string in tst-strncmp-rtm.c
- x86: Test wcscmp RTM in the wcsncmp overflow case [BZ #28896]
- x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #28896]
- string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]
- linux: fix accuracy of get_nprocs and get_nprocs_conf [BZ #28865]
- Add reference to BZ#28860 on NEWS
- linux: Fix missing __convert_scm_timestamps (BZ #28860)
2022-03-15 08:56:55 +01:00

61 lines
1.4 KiB
Diff

commit 04d60ce0f21ffe2a4add148cb37a1942dbad64e2
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Feb 17 08:10:35 2022 -0800
string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]
Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
fails without
commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date: Sun Jan 9 16:02:21 2022 -0600
x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]
and
commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date: Sun Jan 9 16:02:28 2022 -0600
x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]
This is for BZ #28755.
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
(cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)
diff --git a/string/test-strncmp.c b/string/test-strncmp.c
index 10b34de8d2acb2a1..97e831d88fd24316 100644
--- a/string/test-strncmp.c
+++ b/string/test-strncmp.c
@@ -435,6 +435,18 @@ check3 (void)
}
}
+static void
+check4 (void)
+{
+ const CHAR *s1 = L ("abc");
+ CHAR *s2 = STRDUP (s1);
+
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1, s2, SIZE_MAX, 0);
+
+ free (s2);
+}
+
int
test_main (void)
{
@@ -445,6 +457,7 @@ test_main (void)
check1 ();
check2 ();
check3 ();
+ check4 ();
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)