From: Ali Alnubani <alialnu@nvidia.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <stable@dpdk.org>
Subject: [PATCH] buildtools: fix build with clang 17
Date: Wed, 20 Mar 2024 17:58:14 +0200 [thread overview]
Message-ID: <20240320155814.617220-1-alialnu@nvidia.com> (raw)
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 <thomas@monjalon.net>
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
---
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
next reply other threads:[~2024-03-20 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 15:58 Ali Alnubani [this message]
2024-03-20 16:30 ` David Marchand
2024-06-27 12:36 ` David Marchand
2024-06-27 16:50 ` Ali Alnubani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240320155814.617220-1-alialnu@nvidia.com \
--to=alialnu@nvidia.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).