public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/106573] Missing -Wanalyzer-use-of-uninitialized-value on calls handled by state machines
Date: Wed, 10 Aug 2022 00:01:38 +0000	[thread overview]
Message-ID: <bug-106573-4-RhxerjHtQm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106573-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:

https://gcc.gnu.org/g:bddd8d86e3036e480158ba9219ee3f290ba652ce

commit r13-2007-gbddd8d86e3036e480158ba9219ee3f290ba652ce
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Tue Aug 9 19:58:54 2022 -0400

    analyzer: fix missing -Wanalyzer-use-of-uninitialized-value on
special-cased functions [PR106573]

    We were missing checks for uninitialized params on calls to functions
    that the analyzer has hardcoded knowledge of - both for those that are
    handled just by state machines, and for those that are handled in
    region-model-impl-calls.cc (for those arguments for which the svalue
    wasn't accessed in handling the call).

    Fixed thusly.

    gcc/analyzer/ChangeLog:
            PR analyzer/106573
            * region-model.cc (region_model::on_call_pre): Ensure that we call
            get_arg_svalue on all arguments.

    gcc/testsuite/ChangeLog:
            PR analyzer/106573
            * gcc.dg/analyzer/error-uninit.c: New test.
            * gcc.dg/analyzer/fd-uninit-1.c: New test.
            * gcc.dg/analyzer/file-uninit-1.c: New test.

    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

  parent reply	other threads:[~2022-08-10  0:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 19:51 [Bug analyzer/106573] New: " dmalcolm at gcc dot gnu.org
2022-08-09 20:33 ` [Bug analyzer/106573] " dmalcolm at gcc dot gnu.org
2022-08-10  0:01 ` cvs-commit at gcc dot gnu.org [this message]
2022-08-10  0:07 ` dmalcolm at gcc dot gnu.org
2022-08-15 18:48 ` cvs-commit at gcc dot gnu.org
2023-03-29 18:18 ` cvs-commit at gcc dot gnu.org
2023-03-29 18:18 ` cvs-commit 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-106573-4-RhxerjHtQm@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).