* [PATCH] hash: fix maybe-uninitialized warnings on build
@ 2026-02-12 16:27 Bruce Richardson
2026-02-12 16:44 ` Medvedkin, Vladimir
2026-02-12 16:54 ` David Marchand
0 siblings, 2 replies; 5+ messages in thread
From: Bruce Richardson @ 2026-02-12 16:27 UTC (permalink / raw)
To: dev; +Cc: vladimir.medvedkin, Bruce Richardson, stable
Following recent changes to the test-meson-build.sh script[1] to use more
build-types warnings are seen in the hash library GFNI code about values
possibly being uninitialized.
In function ‘_mm512_mask_permutexvar_epi8’,
inlined from ‘__rte_thash_gfni’ at ../lib/hash/rte_thash_x86_gfni.h:150:6:
/usr/lib/gcc/x86_64-linux-gnu/15/include/avx512vbmiintrin.h:97:20: error: ‘tuple_bytes_2’ may be used uninitialized [-Werror=maybe-uninitialized]
These all appear to be a false positive, but fix these by explicitly
zero-initializing the offending values.
[1] 177acaf5cf75 ("devtools: test different build types")
Fixes: 4fd8c4cb0de1 ("hash: add new Toeplitz hash implementation")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/hash/rte_thash_x86_gfni.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/hash/rte_thash_x86_gfni.h b/lib/hash/rte_thash_x86_gfni.h
index 99226b7592..69973503fd 100644
--- a/lib/hash/rte_thash_x86_gfni.h
+++ b/lib/hash/rte_thash_x86_gfni.h
@@ -89,9 +89,9 @@ __rte_thash_gfni(const uint64_t *mtrx, const uint8_t *tuple,
const __m512i shift_8 = _mm512_set1_epi8(8);
__m512i xor_acc = _mm512_setzero_si512();
__m512i perm_bytes = _mm512_setzero_si512();
- __m512i vals, matrixes, tuple_bytes_2;
+ __m512i vals, matrixes, tuple_bytes_2 = _mm512_setzero_si512();
__m512i tuple_bytes = _mm512_setzero_si512();
- __mmask64 load_mask, permute_mask_2;
+ __mmask64 load_mask, permute_mask_2 = 0;
__mmask64 permute_mask = 0;
int chunk_len = 0, i = 0;
uint8_t mtrx_msk;
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] hash: fix maybe-uninitialized warnings on build
2026-02-12 16:27 [PATCH] hash: fix maybe-uninitialized warnings on build Bruce Richardson
@ 2026-02-12 16:44 ` Medvedkin, Vladimir
2026-02-12 16:54 ` David Marchand
1 sibling, 0 replies; 5+ messages in thread
From: Medvedkin, Vladimir @ 2026-02-12 16:44 UTC (permalink / raw)
To: Bruce Richardson, dev; +Cc: stable
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
On 2/12/2026 4:27 PM, Bruce Richardson wrote:
> Following recent changes to the test-meson-build.sh script[1] to use more
> build-types warnings are seen in the hash library GFNI code about values
> possibly being uninitialized.
>
> In function ‘_mm512_mask_permutexvar_epi8’,
> inlined from ‘__rte_thash_gfni’ at ../lib/hash/rte_thash_x86_gfni.h:150:6:
> /usr/lib/gcc/x86_64-linux-gnu/15/include/avx512vbmiintrin.h:97:20: error: ‘tuple_bytes_2’ may be used uninitialized [-Werror=maybe-uninitialized]
>
> These all appear to be a false positive, but fix these by explicitly
> zero-initializing the offending values.
>
> [1] 177acaf5cf75 ("devtools: test different build types")
>
> Fixes: 4fd8c4cb0de1 ("hash: add new Toeplitz hash implementation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> lib/hash/rte_thash_x86_gfni.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/hash/rte_thash_x86_gfni.h b/lib/hash/rte_thash_x86_gfni.h
> index 99226b7592..69973503fd 100644
> --- a/lib/hash/rte_thash_x86_gfni.h
> +++ b/lib/hash/rte_thash_x86_gfni.h
> @@ -89,9 +89,9 @@ __rte_thash_gfni(const uint64_t *mtrx, const uint8_t *tuple,
> const __m512i shift_8 = _mm512_set1_epi8(8);
> __m512i xor_acc = _mm512_setzero_si512();
> __m512i perm_bytes = _mm512_setzero_si512();
> - __m512i vals, matrixes, tuple_bytes_2;
> + __m512i vals, matrixes, tuple_bytes_2 = _mm512_setzero_si512();
> __m512i tuple_bytes = _mm512_setzero_si512();
> - __mmask64 load_mask, permute_mask_2;
> + __mmask64 load_mask, permute_mask_2 = 0;
> __mmask64 permute_mask = 0;
> int chunk_len = 0, i = 0;
> uint8_t mtrx_msk;
--
Regards,
Vladimir
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hash: fix maybe-uninitialized warnings on build
2026-02-12 16:27 [PATCH] hash: fix maybe-uninitialized warnings on build Bruce Richardson
2026-02-12 16:44 ` Medvedkin, Vladimir
@ 2026-02-12 16:54 ` David Marchand
2026-02-12 17:01 ` Bruce Richardson
2026-02-13 18:22 ` Thomas Monjalon
1 sibling, 2 replies; 5+ messages in thread
From: David Marchand @ 2026-02-12 16:54 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, vladimir.medvedkin, stable
On Thu, 12 Feb 2026 at 17:27, Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Following recent changes to the test-meson-build.sh script[1] to use more
> build-types warnings are seen in the hash library GFNI code about values
> possibly being uninitialized.
>
> In function ‘_mm512_mask_permutexvar_epi8’,
> inlined from ‘__rte_thash_gfni’ at ../lib/hash/rte_thash_x86_gfni.h:150:6:
> /usr/lib/gcc/x86_64-linux-gnu/15/include/avx512vbmiintrin.h:97:20: error: ‘tuple_bytes_2’ may be used uninitialized [-Werror=maybe-uninitialized]
>
> These all appear to be a false positive, but fix these by explicitly
> zero-initializing the offending values.
>
> [1] 177acaf5cf75 ("devtools: test different build types")
>
> Fixes: 4fd8c4cb0de1 ("hash: add new Toeplitz hash implementation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Too bad Intel CI did not catch it.
Acked-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hash: fix maybe-uninitialized warnings on build
2026-02-12 16:54 ` David Marchand
@ 2026-02-12 17:01 ` Bruce Richardson
2026-02-13 18:22 ` Thomas Monjalon
1 sibling, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2026-02-12 17:01 UTC (permalink / raw)
To: David Marchand; +Cc: dev, vladimir.medvedkin, stable
On Thu, Feb 12, 2026 at 05:54:22PM +0100, David Marchand wrote:
> On Thu, 12 Feb 2026 at 17:27, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Following recent changes to the test-meson-build.sh script[1] to use more
> > build-types warnings are seen in the hash library GFNI code about values
> > possibly being uninitialized.
> >
> > In function ‘_mm512_mask_permutexvar_epi8’,
> > inlined from ‘__rte_thash_gfni’ at ../lib/hash/rte_thash_x86_gfni.h:150:6:
> > /usr/lib/gcc/x86_64-linux-gnu/15/include/avx512vbmiintrin.h:97:20: error: ‘tuple_bytes_2’ may be used uninitialized [-Werror=maybe-uninitialized]
> >
> > These all appear to be a false positive, but fix these by explicitly
> > zero-initializing the offending values.
> >
> > [1] 177acaf5cf75 ("devtools: test different build types")
> >
> > Fixes: 4fd8c4cb0de1 ("hash: add new Toeplitz hash implementation")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Too bad Intel CI did not catch it.
>
> Acked-by: David Marchand <david.marchand@redhat.com>
>
I don't think any of the CIs use the test-meson-build scripts, do they?
It's more a convenience for maintainers.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hash: fix maybe-uninitialized warnings on build
2026-02-12 16:54 ` David Marchand
2026-02-12 17:01 ` Bruce Richardson
@ 2026-02-13 18:22 ` Thomas Monjalon
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2026-02-13 18:22 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, vladimir.medvedkin, David Marchand, stable
12/02/2026 17:54, David Marchand:
> On Thu, 12 Feb 2026 at 17:27, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Following recent changes to the test-meson-build.sh script[1] to use more
> > build-types warnings are seen in the hash library GFNI code about values
> > possibly being uninitialized.
> >
> > In function ‘_mm512_mask_permutexvar_epi8’,
> > inlined from ‘__rte_thash_gfni’ at ../lib/hash/rte_thash_x86_gfni.h:150:6:
> > /usr/lib/gcc/x86_64-linux-gnu/15/include/avx512vbmiintrin.h:97:20: error: ‘tuple_bytes_2’ may be used uninitialized [-Werror=maybe-uninitialized]
> >
> > These all appear to be a false positive, but fix these by explicitly
> > zero-initializing the offending values.
> >
> > [1] 177acaf5cf75 ("devtools: test different build types")
> >
> > Fixes: 4fd8c4cb0de1 ("hash: add new Toeplitz hash implementation")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Too bad Intel CI did not catch it.
>
> Acked-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-13 18:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12 16:27 [PATCH] hash: fix maybe-uninitialized warnings on build Bruce Richardson
2026-02-12 16:44 ` Medvedkin, Vladimir
2026-02-12 16:54 ` David Marchand
2026-02-12 17:01 ` Bruce Richardson
2026-02-13 18:22 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox