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 libc/29863] Segmentation fault in memcmp-sse2.S if memory contents can concurrently change
Date: Tue, 13 Dec 2022 23:39:33 +0000 [thread overview]
Message-ID: <bug-29863-131-mpxTJsqYXs@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29863-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=29863
--- Comment #15 from Noah Goldstein <goldstein.w.n at gmail dot com> ---
(In reply to Narayanan Iyer from comment #14)
> (In reply to Noah Goldstein from comment #13)
> >
> > Can you test the following dif:
> > ```
> > @@ -308,7 +308,7 @@ L(ret_nonzero_vec_end_0):
> > setg %dl
> > leal -1(%rdx, %rdx), %eax
> > # else
> > - addl %edx, %eax
> > + addq %rdx, %rax
> > movzbl (VEC_SIZE * -1 + SIZE_OFFSET)(%rsi, %rax), %ecx
> > movzbl (VEC_SIZE * -1 + SIZE_OFFSET)(%rdi, %rax), %eax
> > subl %ecx, %eax
> >
> > ```
> >
> > If that fixes things I'm okay making the change.
> >
> > I'm opposed to explicitly supporting it, but am happy
> > to try and make this failure from the unsupported
> > usage less dramatic.
>
> This change sounds much better.
>
> Is there a url that describes how to build glibc from source and use it in
> my application?
I just built the current/fixed memcmp into a single library and used
LD_PRELOAD.
This fix seems to keep it from segfaulting although I wouldn't be
surprised if there are some edge cases in other impls / paths
around page boundaries where it can still segfault.
I'll submit a patch with these changes although I'm not sure
its going to get backported.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2022-12-13 23:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 10:49 [Bug libc/29863] New: " nars at yottadb dot com
2022-12-12 13:02 ` [Bug libc/29863] " nars at yottadb dot com
2022-12-13 18:26 ` pinskia at gcc dot gnu.org
2022-12-13 18:28 ` pinskia at gcc dot gnu.org
2022-12-13 18:33 ` nars at yottadb dot com
2022-12-13 18:39 ` pinskia at gcc dot gnu.org
2022-12-13 18:45 ` nars at yottadb dot com
2022-12-13 18:52 ` pinskia at gcc dot gnu.org
2022-12-13 19:13 ` goldstein.w.n at gmail dot com
2022-12-13 19:36 ` bhaskar at yottadb dot com
2022-12-13 20:09 ` goldstein.w.n at gmail dot com
2022-12-13 20:18 ` goldstein.w.n at gmail dot com
2022-12-13 20:46 ` nars at yottadb dot com
2022-12-13 21:09 ` hjl.tools at gmail dot com
2022-12-13 21:53 ` bhaskar at yottadb dot com
2022-12-13 23:01 ` goldstein.w.n at gmail dot com
2022-12-13 23:16 ` nars at yottadb dot com
2022-12-13 23:39 ` goldstein.w.n at gmail dot com [this message]
2022-12-14 0:14 ` goldstein.w.n at gmail dot com
2022-12-14 7:45 ` sam at gentoo dot org
2022-12-14 15:40 ` nars at yottadb dot com
2022-12-14 18:17 ` nars at yottadb dot com
2023-05-14 21:46 ` ppluzhnikov at google dot com
2023-05-14 21:48 ` ppluzhnikov at google dot com
2023-05-14 21:49 ` ppluzhnikov at google dot com
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-29863-131-mpxTJsqYXs@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).