From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 577093858D32; Thu, 2 Nov 2023 16:22:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 577093858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698942173; bh=8zdrlsjWQvLC+yq0fXpOJLgxJbCpoWKwfNbAQilT6Zg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rOkx/CUKGGKSV5/kqm83tQXLGFi7VimdSuyh2qiPozJ2JXKFCMgZfRkZMa1JVGc5F Sw64QJx+tx8310R7iynboGSnmnQ1tRxFM7F8YlRezARnKXJx+a3uIje6FT/1kTIPTt Bl4Lp9HUE4qCuHpRlP/IUHXzigcFoacHLs68i6WE= From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug string/29234] Bug in rawmemchr-avx2 can return incorrect result Date: Thu, 02 Nov 2023 16:22:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: string X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 2.36 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone resolution cc bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29234 Carlos O'Donell changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.36 Resolution|--- |FIXED CC| |carlos at redhat dot com Status|UNCONFIRMED |RESOLVED --- Comment #3 from Carlos O'Donell --- Fixed already. commit 2c9af8421d2b4a7fcce163e7bc81a118d22fd346 Author: Noah Goldstein Date: Wed Jun 8 14:34:59 2022 -0700 x86: Fix page cross case in rawmemchr-avx2 [BZ #29234] commit 6dcbb7d95dded20153b12d76d2f4e0ef0cda4f35 Author: Noah Goldstein Date: Mon Jun 6 21:11:33 2022 -0700 x86: Shrink code size of memchr-avx2.S Changed how the page cross case aligned string (rdi) in rawmemchr. This was incompatible with how `L(cross_page_continue)` expected the pointer to be aligned and would cause rawmemchr to read data start started before the beginning of the string. What it would read was in valid memory but could count CHAR matches resulting in an incorrect return value. This commit fixes that issue by essentially reverting the changes to the L(page_cross) case as they didn't really matter. Test cases added and all pass with the new code (and where confirmed to fail with the old code). Reviewed-by: H.J. Lu --=20 You are receiving this mail because: You are on the CC list for the bug.=