From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 711A03858412; Wed, 20 Oct 2021 13:39:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 711A03858412 From: "cvs-commit at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug string/28475] Incorrect access attribute on memfrob Date: Wed, 20 Oct 2021 13:39:14 +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.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2021 13:39:14 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28475 --- Comment #1 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Joseph Myers : https://sourceware.org/git/gitweb.cgi?p=3Dglibc.git;h=3D2c6cabb3a442f467e78= c702cffbd5f003f87f44f commit 2c6cabb3a442f467e78c702cffbd5f003f87f44f Author: Joseph Myers 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 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 , to avoid the use of uninitialized memory. Tested for x86_64, and with build-many-glibcs.py (GCC mainline) for s390x-linux-gnu-O3. --=20 You are receiving this mail because: You are on the CC list for the bug.=