public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Sunil Pandey <skpgkp2@gmail.com>,
	 Libc-stable Mailing List <libc-stable@sourceware.org>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]
Date: Thu, 17 Feb 2022 11:05:52 -0800	[thread overview]
Message-ID: <CAMe9rOpmKwoZvnaqgijSrFb-7fmuVURqBOzfbZ=kqTVo5GjU3Q@mail.gmail.com> (raw)
In-Reply-To: <CAMAf5_ei=o4i2GKe07xSQg+32uA5Bq+PB3TNNwchTkr0zHevMg@mail.gmail.com>

On Thu, Feb 17, 2022 at 10:58 AM Sunil Pandey <skpgkp2@gmail.com> wrote:
>
> LGTM
>
> Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>

I am backporting this to release branches.

> On Thu, Feb 17, 2022 at 8:28 AM H.J. Lu via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
> >
> > 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.
> > ---
> >  string/test-strncmp.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/string/test-strncmp.c b/string/test-strncmp.c
> > index df7cea4068..1a87f0e73e 100644
> > --- a/string/test-strncmp.c
> > +++ b/string/test-strncmp.c
> > @@ -445,6 +445,18 @@ check4 (void)
> >    check_result (impl, s1, s2, size, exp_result);
> >  }
> >
> > +static void
> > +check5 (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);
> > +}
> > +
> >  static void
> >  check_overflow (void)
> >  {
> > @@ -569,6 +581,7 @@ test_main (void)
> >    check2 ();
> >    check3 ();
> >    check4 ();
> > +  check5 ();
> >
> >    printf ("%23s", "");
> >    FOR_EACH_IMPL (impl, 0)
> > --
> > 2.35.1
> >



-- 
H.J.

       reply	other threads:[~2022-02-17 19:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220217162831.417972-1-hjl.tools@gmail.com>
     [not found] ` <CAMAf5_ei=o4i2GKe07xSQg+32uA5Bq+PB3TNNwchTkr0zHevMg@mail.gmail.com>
2022-02-17 19:05   ` H.J. Lu [this message]
2022-02-17 19:17     ` Noah Goldstein
2022-02-17 19:22       ` H.J. Lu

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='CAMe9rOpmKwoZvnaqgijSrFb-7fmuVURqBOzfbZ=kqTVo5GjU3Q@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-stable@sourceware.org \
    --cc=skpgkp2@gmail.com \
    /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).