public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug string/28475] New: Incorrect access attribute on memfrob
@ 2021-10-19 15:50 jsm28 at gcc dot gnu.org
  2021-10-20 13:39 ` [Bug string/28475] " cvs-commit at gcc dot gnu.org
  2021-10-20 13:40 ` jsm28 at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2021-10-19 15:50 UTC (permalink / raw)
  To: glibc-bugs

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

            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=maybe-uninitialized]
   26 |     *p++ ^= 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 reads
and writes the memory pointed to by its argument, so marking it write_only is
incorrect.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-20 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 15:50 [Bug string/28475] New: Incorrect access attribute on memfrob jsm28 at gcc dot gnu.org
2021-10-20 13:39 ` [Bug string/28475] " cvs-commit at gcc dot gnu.org
2021-10-20 13:40 ` jsm28 at gcc dot gnu.org

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).