From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F9973858409; Tue, 19 Oct 2021 15:50:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F9973858409 From: "jsm28 at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug string/28475] New: Incorrect access attribute on memfrob Date: Tue, 19 Oct 2021 15:50:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: jsm28 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Tue, 19 Oct 2021 15:50:19 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28475 Bug ID: 28475 Summary: Incorrect access attribute on memfrob Product: glibc Version: 2.34 Status: NEW Severity: normal Priority: P2 Component: string Assignee: unassigned at sourceware dot org Reporter: jsm28 at gcc dot gnu.org Target Milestone: --- My build-many-glibcs.py bot using GCC mainline has shown a build failure for s390x-linux-gnu-O3 for some time. https://sourceware.org/pipermail/libc-testresults/2021q4/008732.html memfrob.c: In function 'memfrob': memfrob.c:26:10: error: '*(char *)s' may be used uninitialized [-Werror=3Dmaybe-uninitialized] 26 | *p++ ^=3D 42; | ~~~~~^~~~~ memfrob.c:21:16: note: accessing argument 1 of a function declared with attribute 'access (write_only, 1, 2)' 21 | memfrob (void *s, size_t n) | ~~~~~~^ This shows an actual bug in access attribute in the header: memfrob both re= ads and writes the memory pointed to by its argument, so marking it write_only = is incorrect. --=20 You are receiving this mail because: You are on the CC list for the bug.=