From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AB7D45A24 for ; Tue, 17 May 2016 09:55:57 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 17 May 2016 00:55:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,324,1459839600"; d="scan'208,217";a="968512298" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga001.fm.intel.com with ESMTP; 17 May 2016 00:55:55 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.54]) by IRSMSX109.ger.corp.intel.com ([169.254.13.120]) with mapi id 14.03.0248.002; Tue, 17 May 2016 08:55:54 +0100 From: "Mrozowicz, SlawomirX" To: "olivier.matz@6wind.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] test-pmd: Free of address-of expression Thread-Index: AdGvVFKn7F387M7iT/OvcH9J3XqAbQ== Date: Tue, 17 May 2016 07:55:54 +0000 Message-ID: <158888A50F43E34AAE179517F56C97455A52C6@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] test-pmd: Free of address-of expression 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: Tue, 17 May 2016 07:55:58 -0000 Hi, Noticed is that in the file: app/test-pmd/mempool.c using of the function munmap() could cause a problem. Coverity static code analyzer provide error (CID 13184) in line 158: munmap frees incorrect pointer uv. I noticed information on the net: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.b= pxbd00/mumap.htm "If addr is not the address of a mapping established by a prior call to mma= p(), the behavior is undefined" I have analyzed the code and I have done some test with gcc. It seems that it is possible to free subrange of the mapping memory. In the mempool.c code the address is calculated independently. Anyway in my opinion the address variable uv is calculated correctly. So we should classify this issue as a False Positive. Please accept the conclusion. Slawomir Mrozowicz Sii Engineer Delivering outsourced services to Intel Intel Technology Poland sp. z o.o. - KRS 101882 - ul. Slowackiego 173, 80-2= 98 Gdansk