[PATCH 12/12] test/ipsec: fix build with GCC 12
Stephen Hemminger
stephen at networkplumber.org
Sat Jun 11 17:38:43 CEST 2022
On Wed, 18 May 2022 12:16:57 +0200
David Marchand <david.marchand at redhat.com> wrote:
> GCC 12 raises the following warning:
>
> In function ‘_mm256_loadu_si256’,
> inlined from ‘rte_mov32’ at
> ../lib/eal/x86/include/rte_memcpy.h:319:9,
> inlined from ‘rte_mov128’ at
> ../lib/eal/x86/include/rte_memcpy.h:344:2,
> inlined from ‘rte_memcpy_generic’ at
> ../lib/eal/x86/include/rte_memcpy.h:438:4,
> inlined from ‘rte_memcpy’ at
> ../lib/eal/x86/include/rte_memcpy.h:882:10,
> inlined from ‘setup_test_string.constprop’ at
> ../app/test/test_ipsec.c:572:4:
> /usr/lib/gcc/x86_64-redhat-linux/12/include/avxintrin.h:929:10: error:
> array subscript ‘__m256i_u[3]’ is partly outside array bounds of
> ‘const char[108]’ [-Werror=array-bounds]
> 929 | return *__P;
> | ^~~~
> ../app/test/test_ipsec.c: In function ‘setup_test_string.constprop’:
> ../app/test/test_ipsec.c:539:12: note: at offset 96 into object
> ‘null_plain_data’ of size 108
> 539 | const char null_plain_data[] =
> | ^~~~~~~~~~~~~~~
>
> Split copy request into copies of string lengths and remove unused
> blocksize.
>
> Cc: stable at dpdk.org
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
Why is test code for ipsec bother with using rte_memcpy at all.
Instead global replace rte_memcpy() with memcpy() for the whole test.
More information about the stable
mailing list