From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BA51E3857C57; Tue, 29 Sep 2020 19:16:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA51E3857C57 From: "dmalcolm at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2020 19:16:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95188 --- Comment #7 from David Malcolm --- 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 complexi= ty limit (as opposed to merely hitting the per-program-point limit). If I add -fparam-analyzer-bb-explosion-factor=3D50 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 tak= es 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 lead= s 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 t= he 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 o= rder of exploration varying between machines. Mark: please can you add -fdump-analyzer-supergraph to the arguments and at= tach the bzip2.c.supergraph.dot file to this bug. Doing so may help track down = (d).=