From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7459 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Static analysis results Date: Tue, 21 Apr 2015 19:28:30 +0300 (MSK) Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: ger.gmane.org 1429633735 19151 80.91.229.3 (21 Apr 2015 16:28:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Apr 2015 16:28:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7472-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 21 18:28:49 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Ykb2W-00013K-4v for gllmg-musl@m.gmane.org; Tue, 21 Apr 2015 18:28:48 +0200 Original-Received: (qmail 32756 invoked by uid 550); 21 Apr 2015 16:28:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32710 invoked from network); 21 Apr 2015 16:28:41 -0000 User-Agent: Alpine 2.11 (LNX 23 2013-08-11) Xref: news.gmane.org gmane.linux.lib.musl.general:7459 Archived-At: New round of static analysis results. This time it's mostly opportunities for very minor cleanups (I'm showing only a few results that I think make sense). If there's a problem in balance of usefulness vs annoyance, please let me know. dynlink.c:343 'if (runtime)' is already established as true at line 337 sem_open.c:sem_open I didn't try to follow the code in detail, but it seems possible that 'goto fail' can be executed from e.g. line 133 after successful mmap, in which case the region is not unmapped duplocale.c:17 neither of the conditions cannot hold dynlink.c:1503 the first two conditions cannot hold after check at line 1489 and exit at line 1501 fcntl.c:42 F_SETLKW is already taken care of at line 16 also, why does this file cast arg to 'void *' in several places? regcomp.c:2848 condition 'stack != NULL' cannot hold dynlink.c:428 on 64-bit arches, multiplication can overflow in 32-bit type before assignment Alexander