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/95188] analyzer-unsafe-call-within-signal-handler shows wrong statement for signal registration event
Date: Tue, 29 Sep 2020 19:16:40 +0000	[thread overview]
Message-ID: <bug-95188-4-I8qcYFpFxV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95188-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks.  I see a similar deluge of
  "terminating analysis for this program point"
warnings, but at different locations.

My warnings eventually terminate with:

  bzip2.c:1537:31: warning: analysis bailed out early (4561 'after-snode'
enodes; 15071 enodes) [-Wanalyzer-too-complex]

whereas yours don't - my machine is eventually hitting the overall complexity
limit (as opposed to merely hitting the per-program-point limit).

If I add
  -fparam-analyzer-bb-explosion-factor=50
to try to get past that limit (the default for that param is 5) then I see the
-Wanalyzer-unsafe-call-within-signal-handler warnings you're seeing (it takes
quite a while to run).

As in comment #5, I think what's happening is some "random" aspect of the
analysis affecting the order in which the worklist is processed, which leads to
my machine terminating early and yours running to completion.

So there are at least four issues here:

(a) the reported bug: that -Wanalyzer-unsafe-call-within-signal-handler uses
the wrong source location when reporting the signal registration event in the
diagnostic_path
(b) that -fanalyzer is hitting per-program-point limits
(c) that -fanalyzer can hit the overall enode limit
(d) that the behavior is sufficiently "random" that (c) can happen on one
machine and not on another, and that the log for the (b) events shows the order
of exploration varying between machines.

Mark: please can you add -fdump-analyzer-supergraph to the arguments and attach
the bzip2.c.supergraph.dot file to this bug.  Doing so may help track down (d).

  parent reply	other threads:[~2020-09-29 19:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 13:28 [Bug analyzer/95188] New: " mark at gcc dot gnu.org
2020-09-16 23:02 ` [Bug analyzer/95188] " cvs-commit at gcc dot gnu.org
2020-09-16 23:27 ` dmalcolm at gcc dot gnu.org
2020-09-16 23:28 ` dmalcolm at gcc dot gnu.org
2020-09-29 14:09 ` mark at gcc dot gnu.org
2020-09-29 17:31 ` dmalcolm at gcc dot gnu.org
2020-09-29 18:13 ` mark at gcc dot gnu.org
2020-09-29 19:16 ` dmalcolm at gcc dot gnu.org [this message]
2020-09-29 22:33 ` cvs-commit at gcc dot gnu.org
2020-09-29 22:42 ` dmalcolm at gcc dot gnu.org
2020-09-30 22:00 ` mark at gcc dot gnu.org
2020-10-07 14:28 ` dmalcolm at gcc dot gnu.org
2020-10-07 20:05 ` mark at gcc dot gnu.org
2021-03-12 22:35 ` dmalcolm at gcc dot gnu.org
2022-03-25 20:28 ` [Bug analyzer/95188] State explosion on bzip2-1.0.8/bzip2.c hides -Wanalyzer-unsafe-call-within-signal-handler 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-95188-4-I8qcYFpFxV@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).