public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/108666] New: -Wanalyzer-use-of-uninitialized-value false positives seen in coreutils's sum.c: bsd_sum_stream
@ 2023-02-03 22:00 dmalcolm at gcc dot gnu.org
  2023-02-15 19:53 ` [Bug analyzer/108666] " cvs-commit at gcc dot gnu.org
  2023-02-15 19:58 ` dmalcolm at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-02-03 22:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108666

            Bug ID: 108666
           Summary: -Wanalyzer-use-of-uninitialized-value false positives
                    seen in coreutils's sum.c: bsd_sum_stream
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54408
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54408&action=edit
Reproducer

Trunk emits false positives: https://godbolt.org/z/coeesxxP4
Similar to bug 108664, but also emits:

<source>:90:3: warning: use of uninitialized value '*(unsigned int *)&checksum'
[CWE-457] [-Wanalyzer-use-of-uninitialized-value]
   90 |   memcpy(resstream, &checksum, sizeof checksum);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

despite this initialization:
  int checksum = 0;

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

end of thread, other threads:[~2023-02-15 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 22:00 [Bug analyzer/108666] New: -Wanalyzer-use-of-uninitialized-value false positives seen in coreutils's sum.c: bsd_sum_stream dmalcolm at gcc dot gnu.org
2023-02-15 19:53 ` [Bug analyzer/108666] " cvs-commit at gcc dot gnu.org
2023-02-15 19:58 ` dmalcolm 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).