[dpdk-dev] [PATCH v2] test: fix division by zero

Thomas Monjalon thomas at monjalon.net
Wed May 19 09:20:56 CEST 2021


13/05/2021 10:23, Bruce Richardson:
> 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 at dpdk.org
> > 
> > Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> > ---
> > 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 <bruce.richardson at intel.com>

Applied, thanks.





More information about the dev mailing list