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/112969] -Wanalyzer-exposure-through-uninit-copy false positive seen on Linux kernel's drivers/net/ethernet/intel/ice/ice_ptp.c
Date: Thu, 25 Jan 2024 15:07:18 +0000	[thread overview]
Message-ID: <bug-112969-4-13Hl5NMhWF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112969-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from GCC 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:6426d466779fa889bca170e3ff80dbfc6ea8c2e8

commit r14-8428-g6426d466779fa889bca170e3ff80dbfc6ea8c2e8
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Jan 25 10:06:12 2024 -0500

    analyzer: fix defaults in compound assignments from non-zero offsets
[PR112969]

    Confusion in binding_cluster::maybe_get_compound_binding about whether
    offsets are relative to the start of the region or to the start of the
    cluster was leading to incorrect handling of default values, leading
    to false positives from -Wanalyzer-use-of-uninitialized-value, from
    -Wanalyzer-exposure-through-uninit-copy, and other logic errors.

    Fixed thusly.

    gcc/analyzer/ChangeLog:
            PR analyzer/112969
            * store.cc (binding_cluster::maybe_get_compound_binding): When
            populating default_map, express the bit-range of the default key
            for REG relative to REG, rather than to the base region.

    gcc/testsuite/ChangeLog:
            PR analyzer/112969
            * c-c++-common/analyzer/compound-assignment-5.c (test_3): Remove
            xfails, reorder tests.
            * c-c++-common/analyzer/compound-assignment-pr112969.c: New test.
            * gcc.dg/plugin/infoleak-pr112969.c: New test.
            * gcc.dg/plugin/plugin.exp: Add infoleak-pr112969.c to
            analyzer_kernel_plugin.c tests.

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

  parent reply	other threads:[~2024-01-25 15:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 20:07 [Bug analyzer/112969] New: " dmalcolm at gcc dot gnu.org
2024-01-24 22:19 ` [Bug analyzer/112969] " dmalcolm at gcc dot gnu.org
2024-01-25 15:07 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-25 15:11 ` dmalcolm at gcc dot gnu.org
2024-04-14  5:03 ` [Bug analyzer/112969] [11/12/13 Regression] " pinskia at gcc dot gnu.org
2024-05-09 17:11 ` cvs-commit at gcc dot gnu.org
2024-05-09 17:51 ` [Bug analyzer/112969] [11/12 " dmalcolm 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-112969-4-13Hl5NMhWF@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).