From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id CE9912BA9 for ; Thu, 10 Mar 2016 16:03:03 +0100 (CET) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 5A685335E89; Thu, 10 Mar 2016 15:03:03 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-4-209.ams2.redhat.com [10.36.4.209]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2AF32kg015823; Thu, 10 Mar 2016 10:03:02 -0500 To: Remy Horton , dev@dpdk.org References: <1456426121-21423-1-git-send-email-aconole@redhat.com> <1456426121-21423-9-git-send-email-aconole@redhat.com> <56E179E2.1020704@redhat.com> <56E18894.6020409@intel.com> From: Panu Matilainen Message-ID: <56E18CA5.4090200@redhat.com> Date: Thu, 10 Mar 2016 17:03:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56E18894.6020409@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Subject: Re: [dpdk-dev] [PATCH 8/8] drivers/net/ixgbe: Fix uninitialized warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 15:03:04 -0000 On 03/10/2016 04:45 PM, Remy Horton wrote: > > On 10/03/2016 13:42, Panu Matilainen wrote: >> On 02/25/2016 08:48 PM, Aaron Conole wrote: >>> Silence a compiler warning that this variable may be used uninitialized. >>> >>> Signed-off-by: Aaron Conole > [..] >> >> The patch looks ok as such, but then again warning looks like a false >> positive to me: assignment and dereferencing depend on the same value of >> eop, which cannot change between the two. > > In two minds about this. It is a logical impossibility, but these days > optimising compilers are getting very aggressive. For instance GCC has a > delightfully-named -fdelete-null-pointer-checks option, which caused > security holes.. Indeed, that's why silencing a false positive (assuming it actually is one) by throwing some more NULL-checks for the allegedly impossible makes me a bit nervous. Besides compiler optimizations going crazy, I've seen such extra NULL-checks turn into actual bugs when surroundings subtly change. - Panu -