From owner-svn-src-head@freebsd.org Fri Apr 14 15:54:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8ED5D3D4F4 for ; Fri, 14 Apr 2017 15:54:35 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF7C213 for ; Fri, 14 Apr 2017 15:54:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6e5378af-212a-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 6e5378af-212a-11e7-8c46-c35e37f62db1; Fri, 14 Apr 2017 15:52:58 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v3EFrQfG006295; Fri, 14 Apr 2017 09:53:26 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1492185206.73883.126.camel@freebsd.org> Subject: Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64 From: Ian Lepore To: cem@freebsd.org, "Andrey V. Elsukov" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 14 Apr 2017 09:53:26 -0600 In-Reply-To: References: <201704141158.v3EBwfLm003147@repo.freebsd.org> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 15:54:35 -0000 On Fri, 2017-04-14 at 08:32 -0700, Conrad Meyer wrote: > On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. Elsukov > wrote: > > > > Author: ae > > Date: Fri Apr 14 11:58:41 2017 > > New Revision: 316826 > > URL: https://svnweb.freebsd.org/changeset/base/316826 > > > > Log: > >   Avoid undefined behavior. > > > >   The 'pktid' variable is modified while being used twice between > >   sequence points, probably due to htonl() is macro. > FYI — there are a ton of similar reports in sys/rpc due to the XDR > macros (which read a network value off a pointer and increment it). > See e.g., IXDR_GET_UINT32() macro. > > Best, > Conrad Aren't they all false positives, since the macros involved are g'teed not to evaluate their arguments more than once as written (because __builtin_constant_p always evaluates at compile time)?  Do we really want to churn our source code to eliminate false positives from some tool that appears to still be in its alpha-testing state? -- Ian