From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 9BAEC3858D3C for ; Thu, 24 Mar 2022 19:39:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9BAEC3858D3C Received: by mail-pj1-x1033.google.com with SMTP id bx24-20020a17090af49800b001c6872a9e4eso6097645pjb.5 for ; Thu, 24 Mar 2022 12:39:22 -0700 (PDT) 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=bpJoQ0jts1W14lGpLd0kEaIWeJ+88ZPqkrhYtPL/HAk=; b=m7EavbbCVQJPXAo4cutgJNPZlqEvmG1FwOEpJrEKEh61tS2pzpZWOrRoePa86uWK8f wp86kqe8S1/g6t3t6bQnJr1idlP2jtsAIXFYq5QKeixxVRLG4r+pO81qIeownI378/9h Yn0YYCyHlgB+PbawygOI+5ZV/7ZL3Vk1XG89CDJSUbd3VJgxZGD5C7SHG2Gn7Q6p6hty wQFIxrDxEj004ce2ShJQW4XM6hu9SOkHk6ztZhOA+Y+T93cJL1lIe5R6i+id9O68Uk6N szxmsLJ6esEYlsu1U3dxb5HAgNZXaRetoUZxpiNh5dFtr8VkJj8PKSSBFq9o4Zk16fGO ztvA== X-Gm-Message-State: AOAM5308jmpNtqrm0pSV2etCj1SgpF7nLOcHKmMUk/EBGLcbvzSmxVrv kPkNaNeIdPm6Z94/uTE01IvkW5wlhdbZ8PcwnMxB64hy X-Google-Smtp-Source: ABdhPJwjhSaKL7Al+PsQfpoabTDCLeG04OY5CoTSc3Ec+mAesVUyH+PmpzSmQZsIjqqOlp3POZbCZVgnq0wd1iBapgM= X-Received: by 2002:a17:903:2351:b0:154:5ab7:873d with SMTP id c17-20020a170903235100b001545ab7873dmr7426022plh.57.1648150761786; Thu, 24 Mar 2022 12:39:21 -0700 (PDT) MIME-Version: 1.0 References: <20220323215734.3927131-1-goldstein.w.n@gmail.com> <20220323215734.3927131-12-goldstein.w.n@gmail.com> In-Reply-To: From: Noah Goldstein Date: Thu, 24 Mar 2022 14:39:10 -0500 Message-ID: Subject: Re: [PATCH v1 12/23] x86: Fix fallback for wcsncmp_avx2 in strcmp-avx2.S [BZ #28896] To: "H.J. Lu" Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 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-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2022 19:39:24 -0000 On Thu, Mar 24, 2022 at 2:34 PM H.J. Lu wrote: > > On Thu, Mar 24, 2022 at 12:18 PM Noah Goldstein wrote: > > > > On Thu, Mar 24, 2022 at 2:00 PM H.J. Lu wrote: > > > > > > On Wed, Mar 23, 2022 at 3:01 PM Noah Goldstein wrote: > > > > > > > > Overflow case for __wcsncmp_avx2_rtm should be __wcscmp_avx2_rtm not > > > > __wcscmp_avx2. > > > > > > > > All string/memory tests pass. > > > > --- > > > > sysdeps/x86_64/multiarch/strcmp-avx2.S | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S > > > > index 52ff5ad724..86a86b68e3 100644 > > > > --- a/sysdeps/x86_64/multiarch/strcmp-avx2.S > > > > +++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S > > > > @@ -122,7 +122,7 @@ ENTRY(STRCMP) > > > > are cases where length is large enough that it can never be a > > > > bound on valid memory so just use wcscmp. */ > > > > shrq $56, %rcx > > > > - jnz __wcscmp_avx2 > > > > + jnz OVERFLOW_STRCMP > > > > > > > > leaq (, %rdx, 4), %rdx > > > > # endif > > > > -- > > > > 2.25.1 > > > > > > > > > > Isn't it a bug? Is there a glibc bug? Should this also be fixed on release > > > branches? > > > > It is bug but no need for backport. > > Why no need for backport? Is there a testcase? Oh no, you're right. It needs to be backported. Had thought it was a different commit that introduced. Sorry, I'll update the commit message with more info, ping on the bugzilla, and add a test case. Going to push the rest of the patchset, will add v2 for this shortly. > > -- > H.J.