From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 8792C237 for ; Tue, 21 Nov 2017 14:24:18 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3CDE020696; Tue, 21 Nov 2017 08:24:18 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:24:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=42llPHEdvhfZIPz+U tft01vW7ME497Ii3ZFeoLd0qsU=; b=iVqpeBoyt8PJeGZOIzAktPqDn0GWySAaf OATA4PvAK8t3NeYBIe3o+89DFzZlYxr6TZ4UBO6Ep1lNEvG+/KZTKfc9s1BfjhtC lKEHje54Hrz4dy28FxgU+VhaoxfMbBm0i3O0VpzCH/AGvi0pqLxk9fZSPVQuZCG8 5W0LpRtntkrAw2/hFRpDhe7GBdpgMp41C+RoOD5W7kr8S+MBlkneJU42Ip2gTngZ PX0xXlzgxXu/0EWyJzRpiDzzI7+9M0qFzavtJ1VJVChfpOl+dw/QrU4aIqBpSVBh ZT079mmyh7ZBJSU6x4ii21u/HiB4Mx0wHgJfO9hcPK/dNQjvRLjoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=42llPH EdvhfZIPz+Utft01vW7ME497Ii3ZFeoLd0qsU=; b=J8FfeTtVohpSh9rZCd3/Ji gkAL2ZMUY9yrm0w61s95XJQUZMXRDBfoajdSvAxdlJntMJzogN8y4tfOq1hGlfhW EXVQQAqDQ9Kc3ijxsHO700IY0WvtggbtNYbIjXNrVOrRo5LSfu2elrUod//ag22i Kyqow1yTq2yOmJdrtUFrUwPuEHRVwnJiF+UI/QjSWXeBRjGAgLnr2o8UevTIGNJT rX6q0UmhTodxvGW5IBHLKLqm29RTGbYyXRyA3xFoh9bdet+1vk+RT3h08IsdmbVh nlcolZPclUY1gsWHRH6kgF3EsIiBPGh8AUDP21fjWcVettZVXw/7NZb6fFM0M9BQ == X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id D33E624631; Tue, 21 Nov 2017 08:24:15 -0500 (EST) From: Yuanhan Liu To: Olivier Matz Cc: Pablo de Lara , dpdk stable Date: Tue, 21 Nov 2017 21:16:58 +0800 Message-Id: <1511270333-31002-76-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/test-crypto-perf: fix compilation with -Og' has been queued to stable release 17.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 13:24:18 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 94d3517148cd41dfa8d458269dec81d79aecba71 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Mon, 11 Sep 2017 17:13:33 +0200 Subject: [PATCH] app/test-crypto-perf: fix compilation with -Og MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit addaac42a0c3904ac6adde7d211e6ad8d43515d0 ] The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following error: CC cperf_test_verify.o cperf_test_verify.c: In function ‘cperf_verify_op’: cperf_test_verify.c:382:5: error: ‘auth’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (auth == 1) { ^ cperf_test_verify.c:371:5: error: ‘cipher’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (cipher == 1) { ^ cperf_test_verify.c:384:11: error: ‘auth_offset’ may be used uninitialized in this function [-Werror=maybe-uninitialized] res += memcmp(data + auth_offset, ^~~~~~~~~~~~~~~~~~~~~~~~~~ vector->digest.data, ~~~~~~~~~~~~~~~~~~~~ options->digest_sz); ~~~~~~~~~~~~~~~~~~~ cperf_test_verify.c:377:11: error: ‘cipher_offset’ may be used uninitialized in this function [-Werror=maybe-uninitialized] res += memcmp(data + cipher_offset, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vector->plaintext.data, ~~~~~~~~~~~~~~~~~~~~~~~ options->test_buffer_size); ~~~~~~~~~~~~~~~~~~~~~~~~~~ There is no default case in the switch statement, so if options->op_type is an unknown value, the function will use uninitialized values. Fix it by adding a default. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- app/test-crypto-perf/cperf_test_verify.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c index 5221f22..36be7b8 100644 --- a/app/test-crypto-perf/cperf_test_verify.c +++ b/app/test-crypto-perf/cperf_test_verify.c @@ -366,6 +366,9 @@ cperf_verify_op(struct rte_crypto_op *op, auth = 1; auth_offset = vector->aad.length + options->test_buffer_size; break; + default: + res = 1; + goto out; } if (cipher == 1) { @@ -386,6 +389,7 @@ cperf_verify_op(struct rte_crypto_op *op, options->digest_sz); } +out: rte_free(data); return !!res; } -- 2.7.4