mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 06:40:09 +00:00
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 commitddf0992cf5
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 commit7e08db3359
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 commitaa5a720056
)
This commit is contained in:
parent
c6b346ec55
commit
775c05b28c
@ -403,6 +403,18 @@ check2 (void)
|
||||
free (s2);
|
||||
}
|
||||
|
||||
static void
|
||||
check3 (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)
|
||||
{
|
||||
@ -412,6 +424,7 @@ test_main (void)
|
||||
|
||||
check1 ();
|
||||
check2 ();
|
||||
check3 ();
|
||||
|
||||
printf ("%23s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user