public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Raoni Fassina Firmino <raoni@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/ibm/2.32/master] string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]
Date: Fri,  1 Apr 2022 20:08:06 +0000 (GMT)	[thread overview]
Message-ID: <20220401200806.1C4ED383802A@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f8a2390000c4e9a152b5f6cf8220f2560c01e74

commit 0f8a2390000c4e9a152b5f6cf8220f2560c01e74
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:
---
 string/test-strncmp.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/string/test-strncmp.c b/string/test-strncmp.c
index d961ac4493..02806f4ebd 100644
--- a/string/test-strncmp.c
+++ b/string/test-strncmp.c
@@ -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)


                 reply	other threads:[~2022-04-01 20:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220401200806.1C4ED383802A@sourceware.org \
    --to=raoni@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).