Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d76MB-0004o6-8S for pgsql-bugs@arkaria.postgresql.org; Sat, 06 May 2017 20:31:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d76MA-0004xe-RO for pgsql-bugs@arkaria.postgresql.org; Sat, 06 May 2017 20:31:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d76MA-0004xV-EI for pgsql-bugs@postgresql.org; Sat, 06 May 2017 20:31:10 +0000 Received: from mail.aegee.org ([144.76.142.78]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d76M7-0002n6-D7 for pgsql-bugs@postgresql.org; Sat, 06 May 2017 20:31:09 +0000 Authentication-Results: aegeeserv.aegee.org; auth=pass (PLAIN) smtp.auth=didopalauzov DKIM-Filter: OpenDKIM Filter v2.10.3 mail.aegee.org v46KWNa6008732 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aegee.org; s=k4096; t=1494102744; i=dkim+MSA-tls@aegee.org; r=y; bh=OfEcTx8clYzwKay+S8KIP4Qwt5pb10hQ+Bxdzmx/sB4=; h=Subject:To:References:From:Date:In-Reply-To; b=eeFE+v31JcCG8QnU+BCNIfZz5kQepi9GT7LL6Xi046FM61En54oUU6D5TkaDXD+h8 uEU2a0AEhmtBpRfaTIti3eT1AthDJ+iZoiNfnOyen7LPin1z4aFFN7RlfCfUCPmGoj 06BUUOaY0OdRXeNDmZaLp93sCCQcZP81/L4BpWn96v5qGg1DrIj0DIDu8z7pQqjhof F8Gt5ToegMrYXYs7tVvU8EWOG8UGaUFnYymmhjRpndLlgCoEMMNrXKmkIK2O3jPP8z l2dCe2TNPjFpomwuoqMRIFWcHW6fP2tA1+VkGxp9C0sG3eJYJZT8+MW7oczyTXr3Mn hWw6dtdRfqhBI3jvpgMPvWWeba6HZaVXdsPhEFe7x10Cp2gQRpsxYQ5qg7naffJoog 5fMnIbYO193ge6COKno0jX+N7Kr4ufJtpPKRI9VlWvO7Tmeka9MarSgo/GoWm/IPCE oyIfe3uhe221VyjLGtLvfK6cSth+Mb74HveLP0Ahzg4JoSIFZDoe57m4/RqR6wDdZw Bo1xEK0A1nguxJblH1bYHFkGBzhrPKX7ZYR/v1iMtR7j8JlHj7QnSWCqoJ54/AjfQY fa+MVCpQyqGlJg51hKUCiI0nvVPeqW6x6xZaMbXRPLU+SS2NeoxIE3QDQvwbhwzWIZ Po8NMHn1h+M3m/AWkvqwOQWo= Authentication-Results: mail.aegee.org; dkim=none Received: from [192.168.178.39] (x5f74ef1e.dyn.telefonica.de [95.116.239.30]) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id v46KWNa6008732 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sat, 6 May 2017 20:32:24 GMT Subject: Re: Postgresql and Clang Static Analyzer To: pgsql-bugs@postgresql.org References: From: =?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= Message-ID: Date: Sat, 6 May 2017 22:31:05 +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 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