From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 950A3A0A0C; Thu, 13 May 2021 10:23:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E96C4067E; Thu, 13 May 2021 10:23:09 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 18FB54003F for ; Thu, 13 May 2021 10:23:07 +0200 (CEST) IronPort-SDR: Cpnuav39tGu5a3GEwfY83gf9naINhAlpuCSpxGOAcZigHhzUX1bHBuCB6tGTHC25Bz3MzWmshd fBTWxHL47Lbg== X-IronPort-AV: E=McAfee;i="6200,9189,9982"; a="180161895" X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="180161895" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2021 01:23:06 -0700 IronPort-SDR: LL1OfCxTITP/WuVbeBTi4CHalvS0s8gdpEAl7/VuKvV/OCs02ESJzjPiQjMkAojzKPMPFD5nKh ax8NtdyuQETg== X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="623351542" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.3.207]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 13 May 2021 01:23:04 -0700 Date: Thu, 13 May 2021 09:23:00 +0100 From: Bruce Richardson To: "Min Hu (Connor)" Cc: dev@dpdk.org, ferruh.yigit@intel.com, thomas@monjalon.net Message-ID: References: <1619163330-25960-1-git-send-email-humin29@huawei.com> <1620868237-32724-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1620868237-32724-1-git-send-email-humin29@huawei.com> Subject: Re: [dpdk-dev] [PATCH v2] test: fix division by zero X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, May 13, 2021 at 09:10:37AM +0800, Min Hu (Connor) wrote: > Variable i is used as a denominator which may be zero, and > this may result in segmentation fault. > > This patch fixed it. > > Fixes: 948bc3d6d095 ("test: add reciprocal based division") > Cc: stable@dpdk.org > > Signed-off-by: Min Hu (Connor) > --- > v2: > * to skip the printouts if i == 0. > --- > app/test/test_reciprocal_division_perf.c | 41 +++++++++++++++++++------------- > 1 file changed, 24 insertions(+), 17 deletions(-) > Acked-by: Bruce Richardson