[PATCH 08/12] net/qede/base: fix build with GCC 12

David Marchand david.marchand at redhat.com
Wed Jun 22 17:42:25 CEST 2022


On Wed, Jun 22, 2022 at 1:17 AM Stephen Hemminger
<stephen at networkplumber.org> wrote:
> > GCC raises the following warning:
> >
> > In function ‘_mm256_storeu_si256’,
> >     inlined from ‘rte_mov32’ at
> >         ../lib/eal/x86/include/rte_memcpy.h:320:2,
> >     inlined from ‘rte_mov128’ at
> >         ../lib/eal/x86/include/rte_memcpy.h:342: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 ‘__ecore_mcp_cmd_and_union’ at
> >         ../drivers/net/qede/base/ecore_mcp.c:541:3,
> >     inlined from ‘_ecore_mcp_cmd_and_union’ at
> >         ../drivers/net/qede/base/ecore_mcp.c:638:2,
> >     inlined from ‘ecore_mcp_cmd_and_union’ at
> >         ../drivers/net/qede/base/ecore_mcp.c:742:9:
> > /usr/lib/gcc/x86_64-redhat-linux/12/include/avxintrin.h:935:8: error:
> >         array subscript 1 is outside array bounds of
> >         ‘union drv_union_data[1]’ [-Werror=array-bounds]
> >   935 |   *__P = __A;
> >       |   ~~~~~^~~~~
> > ../drivers/net/qede/base/ecore_mcp.c: In function
> >         ‘ecore_mcp_cmd_and_union’:
> > ../drivers/net/qede/base/ecore_mcp.c:533:30: note: at offset 32 into
> >         object ‘union_data’ of size 32
> >   533 |         union drv_union_data union_data;
> >       |                              ^~~~~~~~~~
> >
> > Since this code is in the base driver, waive the check until the base
> > driver is fixed by the relevant people.
>
> Even there are two maintainers, haven't heard a response from them.
> It could be a real bug.

Maintainers were pinged privately but I see no progress.
If I don't get a reply from them by tomorrow morning (GMT+2), I will
merge your RFC patch as it seems the best fix atm.

https://patchwork.dpdk.org/project/dpdk/patch/20220607171746.461772-3-stephen@networkplumber.org/


-- 
David Marchand



More information about the stable mailing list