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 E8A0F43D05 for ; Wed, 20 Mar 2024 17:01:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D505941148; Wed, 20 Mar 2024 17:01:21 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2075.outbound.protection.outlook.com [40.107.223.75]) by mails.dpdk.org (Postfix) with ESMTP id 911B340275; Wed, 20 Mar 2024 16:59:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HK8tNucKuVk8ZnY12bNkb+Hcqry5lpIDF5DkMbtHDJZ4R/mvYV4BDz3RNjfrfsqEGfxYi0/Z1lT35aaIwkpoZcmBRBzpALHzkaHIUOS0bqD9K7xSz8tQC5m2EZSBHCKu+Lm04SntYHmFmtcpnvijRHGqemTgHGJaK3q/GRvtd6fZR6YjMrVZ54jFMUatMC+/v0rGdag5Fi32f/0QWGKujft4/7209TguuopWNlQR2Kzs4IJKLEXTPMawj+2EGdq8ZWmNm9mgrCpr7mbuYEr2u9/9F4+PyrgWPTLuK9NA6DAyiq9+nyj2xG9zHeLtTJvPq71oGcqod+GfghmCI3WoXg== 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=pIxo7oyJXa6gCe9OiaQtVh+Nt61J9wCetEVJ1+T7yzc=; b=PHOgbCC2OROVI5prgkXV96Y+iv0ls5GEQ5BY5cB4YHK4KguUMX2ZA/agR8ZA5BV+yIaU/2v/+N1D73lZrsqVxG8AHmfFpjQIUx6oy0vavgrGy2tMyvnclcO9sxku6t5zjvZi3e9aoqDDLrZmhMSSHHXf8VptenOYsjxD6vWlrXil3VT8ARO93bIWU4LSk/CSfLUIRe1n0WvzgtNGR++uIVSbQZW3e9Blnoho7YJoGGpzr5JHylsgYe+j3nGjAROOPQ9fcQUwLZY0QC64bxCLQlU2078GcGBypfJm6LAPEzSyRHlXorcizOMWRbIfxF7SkhEidR4L4eY4y2KIwcJq6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pIxo7oyJXa6gCe9OiaQtVh+Nt61J9wCetEVJ1+T7yzc=; b=hTomne/FMNNCavxZiedOHOpVQMDeHbEkR59hrOl+Ougu+7U0f6w2xR0euUZnLTZI+DZtfbtoQKpHBTNq9kgvqiWVoThO9mmR5vvn9p9ZgdSSIe5mxvbLaTbUHhR/89vEbrfimkH6McdQctx9kmWscQgR956SfUjSEK2PEgvIdiw8NZs+Q96vxjoKdkoRamucFZQHdpxTPy9PQwzBIWbxl2/gRbax7cV31xd/6L15Ug9VEoScGMfkDxWiSx/ttjNBSku+vZ5sF8AqgzrgAgAgGpXqEP/7noImjHz1/tpybC5MrESzks6i7Dp2jp2tKR9tjv2ZRQryvzyoXQFtIsNVIA== Received: from DM6PR12CA0026.namprd12.prod.outlook.com (2603:10b6:5:1c0::39) by SA1PR12MB5672.namprd12.prod.outlook.com (2603:10b6:806:23c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Wed, 20 Mar 2024 15:59:49 +0000 Received: from DS2PEPF00003447.namprd04.prod.outlook.com (2603:10b6:5:1c0:cafe::8a) by DM6PR12CA0026.outlook.office365.com (2603:10b6:5:1c0::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27 via Frontend Transport; Wed, 20 Mar 2024 15:59:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS2PEPF00003447.mail.protection.outlook.com (10.167.17.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Wed, 20 Mar 2024 15:59:49 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 20 Mar 2024 08:59:29 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Wed, 20 Mar 2024 08:59:28 -0700 From: Ali Alnubani To: CC: , Subject: [PATCH] buildtools: fix build with clang 17 Date: Wed, 20 Mar 2024 17:58:14 +0200 Message-ID: <20240320155814.617220-1-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003447:EE_|SA1PR12MB5672:EE_ X-MS-Office365-Filtering-Correlation-Id: b2c3e43b-8cfd-4746-5d67-08dc48f6c5a0 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sQ2Aw6JpeXun4yTIz8516UKLn9XJL/wobq636WdmIpGbWw9L/RfnYJFd2MM3gyr14Sg+vScckAsXb6IyyRQUsHNTn6wRoC52aMy24okgdeFSZYr9mHdsJ6I+S6jLSEYXeZb9nW60SbW3lxYrBJxImtnDvrWOkOQfL/JFCShy9TgHMwZj3roN99Tes79zrx2OssFGs43uGVQqJbtkZJwO4h8gxB6LilzQfCpm82fmIHsXga0puzc5xnYvIurTsXRIPu217W4fzaA8cJ53VUc43WsOHBI/4iR3V+mnEi+7sbgYFFU4iKps28G/fhAj87dAr971oyMvqjcnIqYFYGDeyJedFpFio/KOU/zzVesDIm+yJL9+dDULUA7FXdI5ES3Lqt0RC/ClwQY8vbUPXCICj9azaNKX2yI88kFq7fyW3QqD2PrPk7lAGA+Sbbc4AZn2ZMaQNZxPaP803odVRn6nONt94CsV9IkDzJZGCWs8Ggigp/52qLd5wzgfy7Z4mLcWREykzFKrh0PVGMqpx6ksGpNbYV53h1xh2oDX07mMzpNemaQImVo8QVNJIAeI/pTsHy31Eeav+EfMBFBDqzXhBpXQ9PlBxlqSv3YeQOrrNcucD5vwasM5egKNBzIm9eeCTwGqcC2AhbCCsn6ulTX8RwfeFbp/zWvJCihHpU1N9h42UHb+9xxr1hn04Pxkr1/t8GzTSE0bWppQ819ZKTAuz/wtpFbvps4Jrz8YBh80qzD0urqaqDDgSyi95q+VTX3D X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(1800799015)(376005)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2024 15:59:49.2981 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2c3e43b-8cfd-4746-5d67-08dc48f6c5a0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003447.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5672 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Fedora 39 with Clang 17.0.3 and ASan enabled, RTE_PMD_EXPORT_NAME seems to be done twice for a single lib, which results in load_drivers() returning a list consisting of 2 drivers (e.g., ['mlx5_common_pci', '']). image.find_by_prefix("this_pmd_name") returns 2 symbols in this case, "mlx5_common_pci" and an empty string ''. This didn't reproduce with clang version 16.0.6. This patch ensures that a symbol with an empty string_value doesn't cause an addition to the list of drivers. Bugzilla ID: 1313 Cc: stable@dpdk.org Suggested-by: Thomas Monjalon Signed-off-by: Ali Alnubani --- buildtools/pmdinfogen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py index 2a44f17bda..2b29872649 100755 --- a/buildtools/pmdinfogen.py +++ b/buildtools/pmdinfogen.py @@ -71,7 +71,9 @@ def find_by_prefix(self, prefix): for i in range(self._symtab.num_symbols()): symbol = self._symtab.get_symbol(i) if symbol.name.startswith(prefix): - yield ELFSymbol(self._image, symbol) + elf_symbol = ELFSymbol(self._image, symbol) + if elf_symbol.string_value: + yield elf_symbol class COFFSymbol: -- 2.25.1