Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7K4F-0004UT-RZ for pgsql-bugs@arkaria.postgresql.org; Sun, 07 May 2017 11:09:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d7K4F-00046z-Ao for pgsql-bugs@arkaria.postgresql.org; Sun, 07 May 2017 11:09:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d7K3Y-0001gI-8Q for pgsql-bugs@postgresql.org; Sun, 07 May 2017 11:08:52 +0000 Received: from mail.aegee.org ([144.76.142.78]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7K3Q-0005EX-0g for pgsql-bugs@postgresql.org; Sun, 07 May 2017 11:08:51 +0000 Authentication-Results: aegeeserv.aegee.org; auth=pass (PLAIN) smtp.auth=didopalauzov DKIM-Filter: OpenDKIM Filter v2.10.3 mail.aegee.org v47BA1GI016414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aegee.org; s=k4096; t=1494155402; i=dkim+MSA-tls@aegee.org; r=y; bh=4ZlJluCZIgX9wgEDR6NkQ0wSliCBzMdBfgshuSUESTs=; h=Subject:To:References:From:Date:In-Reply-To; b=St6z9Tnmnm3+DLau+niQ53lmDahzTwrMhLS19M7TWKwkMKhGOWb0eAvw+1dxHczr8 QPvcnJ3LlKtxwuFLbQvOzxws0W+WH+Il5gzEyfoQtzvYhCvVuIdLLfYM44XToO/GQs 1xcD0i0+1TRl4wVjSRrPxnIgnbE5dzUq9Gc2SdTzv/JDt4UvYseBiRslMYFeFynKZY mJfMeyjMQGWJyRsSMaNVO8vFxx2vaW+d3QbFkRQiqOdB9w13RFjC7aWZUsX+LbpfR7 TLyaXYotO9LtLzTeMjdB/7sNoza2G9ZcWuHe4cWYhtSWbDJNBL2tQP7+slnhalJWEE d+FGQfqQyqWgJzN/H7igOoZEALLQAQ/oIH9LOR0eFOJQKkpld8mhNs6oBtBqm+8q4s qVCjEWIoh9C4grMBc8Mcr5AcoLORmbtYYHlV2cmQfG4Md2ZMvFnLRmc28N0z+sTFYS KQvaBNWDPbi9Kl1b3MQjyYaYmiOREEyE4LvCoG5rFAQjKO45GoScCl047pYQjrVm+f r/nkdYniQUPGW4cmlbbJ/5+m2vfYdt8L7BxX6PK3vjNe1SY6Ric/40Dw600MCVLO7U xtIrW3+Ug+7bVtjo8ZnjP06CHTSWZDVXQxPWhtB43zCTH6V/c2SDcBNw9oUMvhOlcy Wuz3vlc0mJxUl1xE/MqWcBXg= Authentication-Results: mail.aegee.org; dkim=none Received: from [192.168.178.46] (x5f74f7c7.dyn.telefonica.de [95.116.247.199]) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id v47BA1GI016414 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 7 May 2017 11:10:01 GMT Subject: Re: Postgresql and Clang Static Analyzer To: pgsql-bugs@postgresql.org References: From: =?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= Message-ID: <5d5ae226-bee4-9c0f-34ce-755a0e1205a4@aegee.org> Date: Sun, 7 May 2017 13:08:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.99.2 at mail.aegee.org X-Virus-Status: Clean X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org For the record, I added --enable-cassert, which reduced the hints by 59. PYTHON=/usr/local/bin/python3 scan-build ./configure --prefix=/usr/local --with-perl --with-tcl --with-gssapi --with-ldap --with-openssl --with-libxml --with-libxslt --with-systemd --with-python --enable-cassert scan-build make and the output is at https://mail.aegee.org/dpa/scan-build-pg-628462bda9/ On 05/06/2017 10:31 PM, Дилян Палаузов wrote: > Hello, > > I provided the analysis for your information, without stating whether > there are bugs. > > I think most reported stuff is justified, e.g. in > src/backend/storage/smgr/md.c:875 the initialization seems to be indeed > superflous. Likewise for the assignment on > src/interfaces/libpq/fe-print.c:347. > > It is not hard to click through the links and verify, whether they are > false positives, when you know how the code is structured. > > You can use lynx if you want to exclude any danger. > > I wouldn't have a problem if you ignore the analysis. > > Regards > Дилян > > On 05/05/2017 11:41 PM, Bill Parker wrote: >> This by itself doesn't prove the existence of a bug, while it's a useful >> tool to find pieces of code which MIGHT be a problem, it doesn't prove >> that every instance is an actual bug :) >> >> Clang-Analyzer and other static analysis tools are useful when used with >> actually reading the code in question (I've found bugs which >> clang-analyzer has actually missed in other software projects) >> >> On Fri, May 5, 2017 at 2:36 PM, Дилян Палаузов > > wrote: >> >> Hello, >> >> I compiled postgresql with >> >> PYTHON=/usr/local/bin/python3 scan-build ./configure --with-perl >> --with-tcl --with-gssapi --with-ldap --with-openssl --with-libxml >> --with-libxslt --with-systemd --with-python >> >> scan-build make >> >> and here are the results: >> https://mail.aegee.org/dpa/scan-build-pg-b3a47cdfd6/ >> >> >> >> Please note, that the information is only about what gets actually >> compiled, code disabled by #if .. #endif is not considered (e.g. >> when determining whether a variable assignment is useless). There >> are probably some false-positives. >> >> I used scan-build/clang 4.0. >> >> Enjoy >> Дилян >> >> >> -- >> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org >> ) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-bugs >> >> >> -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs