public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug string/28475] Incorrect access attribute on memfrob
Date: Wed, 20 Oct 2021 13:39:14 +0000	[thread overview]
Message-ID: <bug-28475-131-VR3qiT4jVl@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28475-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28475

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Joseph Myers <jsm28@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2c6cabb3a442f467e78c702cffbd5f003f87f44f

commit 2c6cabb3a442f467e78c702cffbd5f003f87f44f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Oct 20 13:38:50 2021 +0000

    Correct access attribute on memfrob (bug 28475)

    As noted in bug 28475, the access attribute on memfrob in <string.h>
    is incorrect: the function both reads and writes the memory pointed to
    by its argument, so it needs to use __read_write__, not
    __write_only__.  This incorrect attribute results in a build failure
    for accessing uninitialized memory for s390x-linux-gnu-O3 with
    build-many-glibcs.py using GCC mainline.

    Correct the attribute.  Fixing this shows up that some calls to
    memfrob in elf/ tests are reading uninitialized memory; I'm not
    entirely sure of the purpose of those calls, but guess they are about
    ensuring that the stack space is indeed allocated at that point in the
    function, and so it matters that they are calling a function whose
    semantics are unknown to the compiler.  Thus, change the first memfrob
    call in those tests to use explicit_bzero instead, as suggested by
    Florian in
    <https://sourceware.org/pipermail/libc-alpha/2021-October/132119.html>,
    to avoid the use of uninitialized memory.

    Tested for x86_64, and with build-many-glibcs.py (GCC mainline) for
    s390x-linux-gnu-O3.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2021-10-20 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 15:50 [Bug string/28475] New: " jsm28 at gcc dot gnu.org
2021-10-20 13:39 ` cvs-commit at gcc dot gnu.org [this message]
2021-10-20 13:40 ` [Bug string/28475] " jsm28 at gcc dot gnu.org

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-28475-131-VR3qiT4jVl@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).