public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/98918] Analyzer false positives due to sm-state involving UNKNOWN pointers
Date: Mon, 01 Feb 2021 15:20:05 +0000	[thread overview]
Message-ID: <bug-98918-4-6k4YQafUTK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98918-4@http.gcc.gnu.org/bugzilla/>

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-02-01
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Confirmed.

The issue occurs due to state-merger in the loop, where we eventually have
various symbolic values involving UNKNOWN in the iteration
e.g. at EN 69 a free(_1) where
    cluster for: _1: INIT_VAL((*UNKNOWN(struct marker *)).ref)
and the analyzer treats the various UNKNOWNs as being the same, hence
eventually a double free when this symbolic value reoccurs.


There are also warnings from -Wanalyzer-too-complex:

t.c:16:17: warning: terminating analysis for this program point: callstring: []
before (SN: 3 stmt: 0):  if (m_2 != 0B)EN: 7, EN: 17, EN: 26, EN: 35, EN: 45,
EN: 55, EN: 64, EN: 73 [-Wanalyzer-too-complex]
       16 |          while (m) {
          |                 ^
t.c: At top level:
t.c:22:1: warning: analysis bailed out early (32 'after-snode' enodes; 110
enodes) [-Wanalyzer-too-complex]
       22 | }
          | ^

  reply	other threads:[~2021-02-01 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 15:17 [Bug analyzer/98918] New: " dmalcolm at gcc dot gnu.org
2021-02-01 15:20 ` dmalcolm at gcc dot gnu.org [this message]
2021-02-01 15:23 ` [Bug analyzer/98918] [11 Regression] " dmalcolm at gcc dot gnu.org
2021-02-01 20:14 ` cvs-commit at gcc dot gnu.org
2021-02-01 20:17 ` 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-98918-4-6k4YQafUTK@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).