From owner-freebsd-current@FreeBSD.ORG Wed Jan 5 14:38:42 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBA3C1065670; Wed, 5 Jan 2011 14:38:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2F48FC13; Wed, 5 Jan 2011 14:38:42 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 58DEC46B2D; Wed, 5 Jan 2011 09:38:42 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4F3768A01D; Wed, 5 Jan 2011 09:38:41 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 5 Jan 2011 09:34:49 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <20110105131439.GN23329@acme.spoerlein.net> <4184C8F2-3C6D-46FB-8F10-DDEBA6DB1C35@cederstrand.dk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201101050934.49845.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 05 Jan 2011 09:38:41 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: =?iso-8859-15?q?Sp=F6rlein?= , Erik Cederstrand , Ulrich Subject: Re: FYI: clang static analyzer page has moved to http://scan.freebsd.your.org/freebsd-head/ X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 14:38:42 -0000 On Wednesday, January 05, 2011 9:11:50 am Erik Cederstrand wrote: > > Den 05/01/2011 kl. 14.56 skrev Erik Cederstrand: > > > Ignoring contrib code for the moment, I decided to look at usr.sbin.pw > > from 2011-01-05. There's one report (http://scan.freebsd.your.org/freebsd-head/usr.sbin.pw/2011-01-05-amd64/report-KkilQ3.html#EndPath) > > which turns out to be a false positive: > > > > * Step 6 calls cmdhelp() on line 168; > > * cmdhelp() ends with "exit(EXIT_FAILURE);" on line 432 which I assume > > is exit(3) from libc > > * The analyzer doesn't know that this function never returns and > > continues to flag a null dereference in step 8 > > The same is true of err(), verr(), errc(), verrc(), errx(), and verrx() > which is also causing false positive reports. They ultimately call exit(3). These are all marked as __dead2, so the compiler should "know" that these do not return. -- John Baldwin