From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id D538C3858D20; Thu, 17 Feb 2022 19:06:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D538C3858D20 Received: by mail-pj1-x1029.google.com with SMTP id q11-20020a17090a304b00b001b94d25eaecso6329217pjl.4; Thu, 17 Feb 2022 11:06:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XRtmE1u8UF8fz3yQ7a0e0kksoiusvhMCm5ydYYZPbGQ=; b=qKL5gi+WrRXs3ZGYiLpJKRiXjraQQrECD9UD/kF0QQTVpKogJC2cGbKIweb2pM27fI YnK1GdF0MAe1aYpmU3ht17QVBFHWgcc/OIJsKlhUJY0yCtQs02YVg0+SALghb8bQbzr2 bZ+/VQflbYDWBME3UpLu2YlpqIsVeUb9GX+HoNs8IWA2WpJQJCwtLPwmoN1KBqMB8djU cDXHnmqtNewB5vHjpDrQnOJMYkuNsm5FtwVleupe5Upzku9cBn9w+7hR/vBWNUD/6eao 8WSCYfJ/2D/ehORB5fHBTa//YpUzQQJe6LcwoWC9HPlrvjB1mvgtk7U5/tY52qOo0ShY mZqQ== X-Gm-Message-State: AOAM530f9q8niawnOls2JMi/v65swUIu6fHHAIUfOGfZnjehrL+QIokc Lz2KGhRWJP+eKtAib6mt7anr8CFwz+5455XAJzE= X-Google-Smtp-Source: ABdhPJw2zH65dpVQrrJxf4nqSCFCCxLhE29RE9PhbbEdyHNyFkDTGSPE99EvQstxNqT4Tu734QfuTmz/eolSeBAHkpE= X-Received: by 2002:a17:90a:c68c:b0:1b9:c16a:35d3 with SMTP id n12-20020a17090ac68c00b001b9c16a35d3mr8639872pjt.120.1645124787919; Thu, 17 Feb 2022 11:06:27 -0800 (PST) MIME-Version: 1.0 References: <20220217162831.417972-1-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Thu, 17 Feb 2022 11:05:52 -0800 Message-ID: Subject: Re: [PATCH] string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755] To: Sunil Pandey , Libc-stable Mailing List Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3027.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2022 19:06:30 -0000 On Thu, Feb 17, 2022 at 10:58 AM Sunil Pandey wrote: > > LGTM > > Reviewed-by: Sunil K Pandey I am backporting this to release branches. > On Thu, Feb 17, 2022 at 8:28 AM H.J. Lu via Libc-alpha > wrote: > > > > Verify that wcsncmp (L"abc", L"abd", SIZE_MAX) == 0. The new test fails > > without > > > > commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87 > > Author: Noah Goldstein > > 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 > > 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.