From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B873838708D1; Mon, 21 Sep 2020 22:49:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B873838708D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600728592; bh=wPwozkzLRvchA2kBfjkYw6LT+wPCpMWTlCYHVeXSD4U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CXPNMrcYc5fDMC9BwyIsmSyQmWC7/NJUupDR3pLgGyPEU8WV2J/6+j01G/cuDMVkS 9jdE9/jJBD3PiZqKfH5YaTn70hVVRAMr4dlbMr4uxY9j9Pt/SPS8okNI1YSeEFen7f 7UX5N9C2vg2bUJ/1vwbX+nXiX1YtxJR90dgERh8k= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/93355] Missing diagnostic for missing fclose in intl/localealias.c Date: Mon, 21 Sep 2020 22:49:52 +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.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: Mon, 21 Sep 2020 22:49:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93355 --- Comment #2 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:15e7b93ba4256884c90198c678ed7eded4e73464 commit r11-3340-g15e7b93ba4256884c90198c678ed7eded4e73464 Author: David Malcolm Date: Fri Sep 18 17:34:50 2020 -0400 analyzer: decls are not on the heap Whilst debugging the remaining state explosion in PR analyzer/93355 I noticed that half of the states at an exploding program point had: 'malloc': {'&buf': 'non-heap'} whereas the other half didn't, presumably depending on whether the path to each enode had used this local buffer: char buf[400]; This patch tweaks malloc_state_machine::get_default_state to be smarter about this, so that we can implicitly treat pointers to decls as non-heap, preventing pointless differences between sm_state_map instances. With that, all of the states in question have equal (empty) malloc sm-state - though the state explosion continues for other reason= s. gcc/analyzer/ChangeLog: PR analyzer/93355 * sm-malloc.cc (malloc_state_machine::get_default_state): Look = at the base region when considering pointers. Treat pointers to decls as being non-heap.=