public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "goldstein.w.n at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug string/29234] Bug in rawmemchr-avx2 can return incorrect result
Date: Thu, 02 Nov 2023 18:16:14 +0000 [thread overview]
Message-ID: <bug-29234-131-yh098LARjY@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29234-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=29234
--- Comment #4 from Noah Goldstein <goldstein.w.n at gmail dot com> ---
you spooked me :)
On Thu, Nov 2, 2023 at 11:22 AM carlos at redhat dot com
<sourceware-bugzilla@sourceware.org> wrote:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=29234
>
> Carlos O'Donell <carlos at redhat dot com> 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 <carlos at redhat dot com> ---
> Fixed already.
>
> commit 2c9af8421d2b4a7fcce163e7bc81a118d22fd346
> Author: Noah Goldstein <goldstein.w.n@gmail.com>
> Date: Wed Jun 8 14:34:59 2022 -0700
>
> x86: Fix page cross case in rawmemchr-avx2 [BZ #29234]
>
> commit 6dcbb7d95dded20153b12d76d2f4e0ef0cda4f35
> Author: Noah Goldstein <goldstein.w.n@gmail.com>
> 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 <hjl.tools@gmail.com>
>
> --
> You are receiving this mail because:
> You reported the bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
prev parent reply other threads:[~2023-11-02 18:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 19:33 [Bug string/29234] New: " goldstein.w.n at gmail dot com
2022-06-08 19:53 ` [Bug string/29234] " goldstein.w.n at gmail dot com
2022-06-08 20:10 ` goldstein.w.n at gmail dot com
2023-11-02 16:22 ` carlos at redhat dot com
2023-11-02 18:16 ` goldstein.w.n at gmail dot com [this message]
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=bug-29234-131-yh098LARjY@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@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).