From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Eimear Morrissey <eimear.morrissey@huawei.com>,
Konstantin Ananyev <konstantin.ananyev@huawei.com>
Subject: [PATCH] test: fix soring build with LTO
Date: Mon, 9 Nov 2026 18:04:37 -0800 [thread overview]
Message-ID: <20261110020438.420106-1-stephen@networkplumber.org> (raw)
With LTO, gcc inlines rte_soring_acquirx_bulk() into
test_soring_stages(). The element copy switches on the runtime
r->esize, so the 16-byte copy path stays live and gcc reports
-Wstringop-overflow writing into the 32 x uint32_t stack arrays.
That path is never taken since the ring is created with 4 byte
elements and metadata.
The diagnostic is emitted by lto1 at link time, so it cannot be
silenced from lib/ring. Disable it for the dpdk-test link only when
LTO is enabled with gcc; non-LTO builds are unchanged.
Bugzilla ID: 2101
Fixes: 70581c355d69 ("test/ring: add unit tests for soring API")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/meson.build | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/test/meson.build b/app/test/meson.build
index 2f1cd817cd..d16ca9f287 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -277,6 +277,12 @@ extra_flags = [
'-fno-strict-aliasing',
]
+# LTO inlines soring acquire into the test, gcc then flags the
+# unreachable 16-byte element copy path (false positive).
+if get_option('b_lto') and cc.get_id() == 'gcc'
+ ldflags += '-Wno-stringop-overflow'
+endif
+
foreach arg: extra_flags
if cc.has_argument(arg)
cflags += arg
--
2.53.0
reply other threads:[~2026-11-10 2:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261110020438.420106-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=eimear.morrissey@huawei.com \
--cc=konstantin.ananyev@huawei.com \
/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