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 99A72A0C4E; Tue, 19 Oct 2021 08:02:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2683740142; Tue, 19 Oct 2021 08:02:09 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id EA1584003E; Tue, 19 Oct 2021 08:02:06 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10141"; a="251897802" X-IronPort-AV: E=Sophos;i="5.85,383,1624345200"; d="scan'208";a="251897802" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 23:02:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,383,1624345200"; d="scan'208";a="444368996" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga003.jf.intel.com with ESMTP; 18 Oct 2021 23:02:05 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 18 Oct 2021 23:02:04 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 18 Oct 2021 23:02:04 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Mon, 18 Oct 2021 23:02:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oa09hGc47Hw2izoJeQgrfGkHHaPqKaauVpByrnuIN7M9Ot81if1q71+DtMFAthj9OjS26PGvqRyDjqaQWfHzJVCcFpmelSs5rwUw8NwcEj7ZwgDzwRMnExgm4Fi7NLrt1MhgmMXZpY0cTEUkBAaMPedTqa9lJPKYB66Tje9Dav3pqzhTQTp8craK1rqZbD3wjwQJUQ/6Kh+QsnnXW5kvTrnT2QBCxg5a0Zgoxhx0UgurW+QR3LiifjhmTuXzsv49awznfT0W7jDFBJ+EXFMQzxCti8z3J3eBMNUO4Aczpkv2avuVZ/rBL09g4HFqQC1ACHzwPFFzSnaNkMKrdL9xjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LKTL8O0nqwYZrL8qjatUDA0ZiVXkwE8pXcCp6NsNY78=; b=cDm98tAHSF4wpfmAmIGeAVumkyYMp7TjJV1Vh3oVLoOtbdJFovInZFJW4LtgjlqSKdA/hekYBz1UhEdj8s6Qy+20FVlk5zbIhpV/OvdEHTmshkG/iL9bQbS9uWqbaVwfD6H0Ft7F4Ap9FdaFAKmlRQe2rSiUT52r95wzO5BzpXt+iNK7uQl7KAbUnsgJoD05AzhLFKzLyt13ikU699IrbaPMN1p+E5xTwPBGiw2B9w/QkBvLakat3dx+7eb0J8SiK5tTD5InFOBbXTeZ7jf+DfFjYpGdAPHLriy3Gft21kte743TJcxtUBVjekwT0sQkBKbJhf+W9u8/ARVjopbkPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LKTL8O0nqwYZrL8qjatUDA0ZiVXkwE8pXcCp6NsNY78=; b=seqLZPqf04eTxBqLLoqhldyBeMKRxfbn1ksCHLzCSLCwvxlEl+53abmSWor14vKlzcQCmXrsAD+IXbNVUcrpCHoBwuFr8f6yW3gCy35xRIECJxiHOmc0kx7NyTjZQRWyKcLikjB+NRILKvN/MMHfpx3SL8SQzWZMRS9PDPF/Uno= Received: from DM8PR11MB5591.namprd11.prod.outlook.com (2603:10b6:8:38::23) by DM8PR11MB5621.namprd11.prod.outlook.com (2603:10b6:8:38::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 06:02:03 +0000 Received: from DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::3d47:b590:aa2a:d5cc]) by DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::3d47:b590:aa2a:d5cc%9]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 06:02:03 +0000 From: "Peng, ZhihongX" To: "david.marchand@redhat.com" , "Burakov, Anatoly" , "Ananyev, Konstantin" , "stephen@networkplumber.org" , "Dumitrescu, Cristian" , "Mcnamara, John" CC: "dev@dpdk.org" , "Lin, Xueqin" , "stable@dpdk.org" Thread-Topic: [PATCH v10 4/4] performance-thread: Fix cross compilation failed Thread-Index: AQHXwdb2AO4IZlfmZkKlb8srTY4YWavZ2Z6A Date: Tue, 19 Oct 2021 06:02:03 +0000 Message-ID: References: <20211012094318.1154727-3-zhihongx.peng@intel.com> <20211015151110.1876850-1-zhihongx.peng@intel.com> <20211015151110.1876850-4-zhihongx.peng@intel.com> In-Reply-To: <20211015151110.1876850-4-zhihongx.peng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1d24796b-fceb-4959-e14b-08d992c5f92b x-ms-traffictypediagnostic: DM8PR11MB5621: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:302; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mS/GBWQVNTgK4X2xpfbytJKLG7yWHCRZe8GSrmFE9FqXjYeV/RvW9joSsWM5uCSRJfxMedIhbzqPLdrSJyQRVuI0tEVAaYnq+gzfCC39UgdQQcGU9a8ZW6XmZ/C4IgFQXSpBnstk+aif08+KUKa4Os4uz44UGji3I7bQr0zDCJspR6NeZmqt/4eRZmUONjoQdxgh0lqXBckpxHRl+kLtmrCPSzUWjrSQP9msnGpVhv1RqCas/LMeRGsv13uxmsKOXIkgnYErk3VHDIA+oBl/HF7EziBBKYJUZkuyVuUgGuJ2R6ZAVeWOaeul0pIuX9SCM5oo23rN5fM4HyS2opebVmIa5btOY2QBdF1l9RxHBx6l8cG30lzGQ/1zxP7sKjHk+CCD5Aih/bxeYgaBJmArh2qNDhbfHLEl740TybsF/HqOM/vZBkMvg7JP6roFJ7qjvJfwJqDjeY6Hc8bo0sgwVpCKagViwy5Ega/muMs4QMk2oxFITgkyQyfx2fo/BB4i6vpv7SCTMhbo1yWq8WzE+xreKe2ZoNJIh8j726xA/vpGuov4mcf2AVN2B4mESONVpuwzL0y8ZdY1UiP6kpN9jpGCHBV0MZU8EojNxtThMhspsjj3LW46mk/L1NvmUrEyybWJMsOEkKqeKRfB4iqdbCeeI+JoNHFZPBjrsARgcYGxbwDh4yIoyi2DEwh+vwb//ya/Ik/VIlqyQxlBA/bqXownyMb+qJTefaFng8ZkwLM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5591.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(54906003)(64756008)(110136005)(66446008)(186003)(9686003)(86362001)(33656002)(76116006)(6506007)(38070700005)(53546011)(82960400001)(8936002)(52536014)(4326008)(6636002)(2906002)(921005)(83380400001)(508600001)(316002)(8676002)(122000001)(38100700002)(66476007)(66556008)(7696005)(71200400001)(26005)(5660300002)(55016002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LlbdYKbKe9byG2TTQkN3GeYI9yYtE5KfLCkmyneEcmba+9dB6dhFMX3jZOS8?= =?us-ascii?Q?BUy4WkXNZBKDyCe74qC+PXSpfBMo8rX6Vpa74TxpYyeHxUZxnreN3WnUoeLW?= =?us-ascii?Q?BU3LYLdtG4PyvZ/Bd6x/PteDByw1MOnlELoavrRJyPcmeuNOnZPefnzMJfao?= =?us-ascii?Q?4kv3nmWyGjLu6LMkOIzaXxR/fq2wDJ1QbrNH8eVkeIG++2WqPXT0ZB4LnP0F?= =?us-ascii?Q?cdYrrGeLA7EQD6WCqfplDdoiJgc2BDpSpdMeNgkkLNxaO/gihd/ZYYyWJD9j?= =?us-ascii?Q?efdcS7VivyplTHlnOV5OOhWQx7k/D1MbPQ+n0ZtkVyHZyfQNoe+7s14L7X2a?= =?us-ascii?Q?icvHBU0L/jItLV05zXzCl30ZoTxp/CQR0QHV7BimZz76Oet1J0k407iA8NPy?= =?us-ascii?Q?2kFBz5dtItlWb3IGpJgzlkCqkuQra/VVGW062qcugq7qWMaf3b9JHWVxK8wB?= =?us-ascii?Q?o6iD6POdDrUMluaWGn3AnbOD5Io04wWGnLZhvJVTKtBVTpoJ5zUgp3fd/OjM?= =?us-ascii?Q?edAhBv8bUyNoWwfP3sG+PjdAOG1XuOFb7pWe9TbpTdPeR2A0Qip9nBBbynH0?= =?us-ascii?Q?rmv9TDAzOJ7V+zfCxxuCQ7cF8vBWV7cTKqx4+eFdh6F8kWLPgnCSzaUPVzEB?= =?us-ascii?Q?ZAUQcZkNS8+pkJobuVkUfzEyq1FZtrPr0+386pySTjt66FshDuCpwvyoGCLj?= =?us-ascii?Q?v4NEm32sxKDovG8syVZP8onfeHP1v/w+OxOMqttHV7xbREUl+O5ONc8+PJyg?= =?us-ascii?Q?R+ZtAkhRSNh/KROUtCzDYIePLo415OC0uDPANEfOSCBEkYhesKt5ogGyfLDZ?= =?us-ascii?Q?hvkDy6x0uCJ7HMAI9O4QmQzGykET6StVZ4KsSoWu5Cw53X7NcNrlzi9WggUB?= =?us-ascii?Q?YzAYK+Q0hBgbogjUS3TMDo6HOrZyg70/ov5B4B9qNbgnzmGEtMwx0yGekKtE?= =?us-ascii?Q?j5qBH9rVtK8xGc2wP47sV4U+v1CWLw0KKbZ7gcYUcyn7HV/tPqjHqyBroQSN?= =?us-ascii?Q?2ReC6FP4S35NeY08f031tkPzSYt7NdTA3kv7XI8xFnOMXOLv/FD2H+golToL?= =?us-ascii?Q?akfwfGrXU/rAhts3aY94kCcv0UUzznkIv1UpILUDWE1t4YXtngiR4bBHhF7I?= =?us-ascii?Q?HGNUa6OCuhCdDQbNHQOcYl7sskK53p8/MBswh76tcQyWNcMF6sFMqV7WWOMu?= =?us-ascii?Q?jRwpT46IccM3IEFTvLEeLUU5zlgnHbuAuyENNKjRUXywprNlzPEFAdB/04VN?= =?us-ascii?Q?vY6hqfobVLJWRrfPnq3lqAcWacsOacensyJLnTn3JWqt53W1FZlavlhooM9C?= =?us-ascii?Q?gEw=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5591.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d24796b-fceb-4959-e14b-08d992c5f92b X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 06:02:03.4747 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yrGYee3LrT3hiN5wQTV2DUMBArc4clBefpAW9U7E4TXsm54+CNR8IbtHkatTxGs2ubGklkj5xAwE6CYIHDCQ8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5621 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v10 4/4] performance-thread: Fix cross compilation failed 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" > -----Original Message----- > From: Peng, ZhihongX > Sent: Friday, October 15, 2021 11:11 PM > To: david.marchand@redhat.com; Burakov, Anatoly > ; Ananyev, Konstantin > ; stephen@networkplumber.org; > Dumitrescu, Cristian ; Mcnamara, John > > Cc: dev@dpdk.org; Lin, Xueqin ; Peng, ZhihongX > ; stable@dpdk.org > Subject: [PATCH v10 4/4] performance-thread: Fix cross compilation failed >=20 > From: Zhihong Peng >=20 > The gcc(arm-linux-gcc) will check code more stricter when ASan enabled. > "strncpy specified bound XX equals destination size" error occurs here. >=20 > Fixes: 116819b9ed0d ("examples/performance-thread: add lthread > subsystem") > Cc: stable@dpdk.org >=20 > Signed-off-by: Xueqin Lin > Signed-off-by: Zhihong Peng > --- > examples/performance-thread/common/lthread.c | 2 +- > examples/performance-thread/common/lthread_cond.c | 4 ++-- > examples/performance-thread/common/lthread_mutex.c | 4 ++-- > 3 files changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/examples/performance-thread/common/lthread.c > b/examples/performance-thread/common/lthread.c > index 3f1f48db43..dd4b3b27ee 100644 > --- a/examples/performance-thread/common/lthread.c > +++ b/examples/performance-thread/common/lthread.c > @@ -463,6 +463,6 @@ void lthread_set_funcname(const char *f) { > struct lthread *lt =3D THIS_LTHREAD; >=20 > - strncpy(lt->funcname, f, sizeof(lt->funcname)); > + strncpy(lt->funcname, f, sizeof(lt->funcname) - 1); > lt->funcname[sizeof(lt->funcname)-1] =3D 0; } diff --git > a/examples/performance-thread/common/lthread_cond.c > b/examples/performance-thread/common/lthread_cond.c > index cdcc7a7b5a..6ec8bc7e82 100644 > --- a/examples/performance-thread/common/lthread_cond.c > +++ b/examples/performance-thread/common/lthread_cond.c > @@ -57,9 +57,9 @@ lthread_cond_init(char *name, struct lthread_cond > **cond, > } >=20 > if (name =3D=3D NULL) > - strncpy(c->name, "no name", sizeof(c->name)); > + strncpy(c->name, "no name", sizeof(c->name) - 1); > else > - strncpy(c->name, name, sizeof(c->name)); > + strncpy(c->name, name, sizeof(c->name) - 1); > c->name[sizeof(c->name)-1] =3D 0; >=20 > c->root_sched =3D THIS_SCHED; > diff --git a/examples/performance-thread/common/lthread_mutex.c > b/examples/performance-thread/common/lthread_mutex.c > index 01da6cad4f..7e5da609b1 100644 > --- a/examples/performance-thread/common/lthread_mutex.c > +++ b/examples/performance-thread/common/lthread_mutex.c > @@ -52,9 +52,9 @@ lthread_mutex_init(char *name, struct lthread_mutex > **mutex, > } >=20 > if (name =3D=3D NULL) > - strncpy(m->name, "no name", sizeof(m->name)); > + strncpy(m->name, "no name", sizeof(m->name) - 1); > else > - strncpy(m->name, name, sizeof(m->name)); > + strncpy(m->name, name, sizeof(m->name) - 1); > m->name[sizeof(m->name)-1] =3D 0; >=20 > m->root_sched =3D THIS_SCHED; > -- > 2.25.1 Hi, John Can you give me an ack? Thanks!