From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 20AE41B2A4; Thu, 21 Dec 2017 16:53:08 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 07:53:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,436,1508828400"; d="scan'208";a="14203486" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 21 Dec 2017 07:53:06 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id vBLFr5Pk032276; Thu, 21 Dec 2017 15:53:05 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id vBLFr5Js017512; Thu, 21 Dec 2017 15:53:05 GMT Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id vBLFr5jR017508; Thu, 21 Dec 2017 15:53:05 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: Cristian Dumitrescu , marcinx.kerlin@intel.com, stable@dpdk.org Date: Thu, 21 Dec 2017 15:53:05 +0000 Message-Id: <846bcc6aa9ec715cc750949e08b80f07341a91fa.1513865562.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] test: fix uninitialized parameter in table autotest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2017 15:53:09 -0000 delete_bulk() copies metadata to pointers provided by the entries parameter, but in the unit test, they are uninitialized, leading to rte_table attempting to memcpy into random garbage pointers. Memsetting pointer table to zero will prevent that from happening. Fixes: 48f2543cf0a8 ("app/test: add bulk adding and deleting") Cc: marcinx.kerlin@intel.com Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov --- test/test/test_table_acl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test/test_table_acl.c b/test/test/test_table_acl.c index 08c100f..6fcf4cc 100644 --- a/test/test/test_table_acl.c +++ b/test/test/test_table_acl.c @@ -532,6 +532,8 @@ setup_acl_pipeline(void) struct rte_pipeline_table_entry *table_entries[5]; int key_found[5]; + memset(table_entries, 0, sizeof(table_entries)); + for (n = 0; n < 5; n++) { memset(&keys[n], 0, sizeof(struct rte_table_acl_rule_delete_params)); key_array[n] = &keys[n]; -- 2.7.4